mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-19 06:26:14 -05:00
feat: collect native HIP facts and log redacted XML responses
This commit is contained in:
27 files changed
+1574
-206
No files matched your search
@@ -28,6 +28,13 @@ foreach ($name in @('gpgui.exe', 'gpauth.exe')) {
|
||||
$process = Start-Process (Join-Path $destination $name) -ArgumentList '--version' -PassThru -Wait
|
||||
if ($process.ExitCode -ne 0) { throw "The installed $name cannot start." }
|
||||
}
|
||||
$helper = Join-Path $destination 'gp-posture.exe'
|
||||
$output = Join-Path $env:TEMP 'gp-posture-install-test.json'
|
||||
$process = Start-Process $helper -PassThru -Wait -RedirectStandardOutput $output
|
||||
if ($process.ExitCode -ne 0) { throw 'The installed posture helper failed.' }
|
||||
$report = Get-Content $output -Raw | ConvertFrom-Json
|
||||
if ($null -eq $report.anti_malware -or $null -eq $report.firewall) { throw 'Invalid posture helper output.' }
|
||||
Remove-Item $output
|
||||
$state = Join-Path $env:LOCALAPPDATA 'GP Connect\config\protected-state'
|
||||
New-Item -ItemType Directory -Force $state | Out-Null
|
||||
$marker = Join-Path $state 'ci-install-retention'
|
||||
|
||||
Reference in new issue
Block a user