Update TGBeta.ps1

This commit is contained in:
2025-01-27 12:58:50 -05:00
parent 526334999f
commit dba9c12d07

View File

@@ -183,7 +183,7 @@ function Install-SVSMSP {
"Install-Splashtop",
"Install-ThreatLocker",
"Install-SVSHelpdesk",
"Install-SVSWatchtower"
),
# Log file path
@@ -621,10 +621,6 @@ function GetHtmlContent {
<input type="checkbox" class="left-checkbox" name="installSVSHelpDesk" id="installSVSHelpDeskCheckbox">
Install SVSHelpDesk
</label>
<label>
<input type="checkbox" class="left-checkbox" name="installSVSWatchtower" id="installSVSWatchtowerCheckbox">
Install SVSWatchtower
</label>
<label>
<input type="checkbox" class="left-checkbox" name="installThreatLocker" id="installThreatLockerCheckbox">
Install ThreatLocker
@@ -1103,15 +1099,7 @@ function GetHtmlContent {
}
}
if (document.querySelector('input[name="installSVSWatchtower"]').checked) {
appendLog("Installing SVS Watchtower (Priority 3)...", "cyan");
try {
await fetch('/installSVSWatchtower', { method: 'GET' });
appendLog("SVS Watchtower installation completed.", "green");
} catch (error) {
appendLog("Error installing SVS Watchtower: " + error.message, "red");
}
}
if (document.querySelector('input[name="installThreatLocker"]').checked) {
appendLog("Installing ThreatLocker (Priority 3)...", "cyan");
@@ -1522,26 +1510,7 @@ try {
$response.OutputStream.Close()
}
"/installSVSWatchtower" {
if ($request.HttpMethod -eq "GET") {
try {
Install-SVSWatchtower
$responseString = "Install SVSWatchtower triggered successfully."
$response.StatusCode = 200
} catch {
$responseString = "Error triggering Install SVSWatchtower: $_"
$response.StatusCode = 500
}
} else {
$responseString = "Method not allowed. Use GET."
$response.StatusCode = 405
}
$buffer = [System.Text.Encoding]::UTF8.GetBytes($responseString)
$response.ContentType = "text/plain"
$response.ContentLength64 = $buffer.Length
$response.OutputStream.Write($buffer, 0, $buffer.Length)
$response.OutputStream.Close()
}
"/EdgeDefaultSearchEngine" {
if ($request.HttpMethod -eq "GET") {
@@ -1553,7 +1522,7 @@ try {
$response.StatusCode = 200
} catch {
Write-LogHybrid -Message "Error setting Edge Default Search Engine: $($_.Exception.Message)" -Level "Error"
$responseString = "Error triggering Install SVSWatchtower: $_"
$responseString = "Error attempting to Set Edge Default Search Engine: $_"
$response.StatusCode = 500
}
} else {
@@ -1571,10 +1540,10 @@ try {
if ($request.HttpMethod -eq "GET") {
try {
Set-SVSBitLocker -Mode Enable -DriveLetter C -SaveToRegistry $true
$responseString = " Set Edge Default Search Engine triggered successfully."
$responseString = " BitLocker enabled on C successfully."
$response.StatusCode = 200
} catch {
$responseString = "Error triggering Install SVSWatchtower: $_"
$responseString = "Error Attempting to set BitLocker: $_"
$response.StatusCode = 500
}
} else {