This commit is contained in:
2026-06-17 07:17:35 +02:00
commit fedd8898d7
5 changed files with 4270 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
# Detection Script – RustDesk mit korrektem Server konfiguriert
# Gibt nichts aus + ExitCode 0 = installiert/konform
# Gibt Text aus + ExitCode 1 = nicht installiert / falsch konfiguriert
$ExpectedServer = "rd.wende.it"
$ExpectedKey = "aPiGBXPfnyXtDCN8tiut2IziZeadbmocOdJEduzKtoQ"
# Prüfe Exe
$RustDeskExe = "$env:ProgramFiles\RustDesk\rustdesk.exe"
if (-not (Test-Path $RustDeskExe)) {
Write-Output "RustDesk nicht installiert."
exit 1
}
# Prüfe Config (ProgramData)
$TomlPath = "$env:ProgramData\RustDesk\RustDesk2.toml"
if (-not (Test-Path $TomlPath)) {
Write-Output "Konfigurationsdatei fehlt."
exit 1
}
$content = Get-Content $TomlPath -Raw
if ($content -notmatch [regex]::Escape($ExpectedServer)) {
Write-Output "Falscher Server konfiguriert."
exit 1
}
if ($content -notmatch [regex]::Escape($ExpectedKey)) {
Write-Output "Falscher Public Key konfiguriert."
exit 1
}
# Alles OK
exit 0