-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated to use new network tester method #99
base: main
Are you sure you want to change the base?
Conversation
New network tester method is more compatible with legacy machines, this method was already present in our PoSh deploy
|
||
# Convert from bytes, if necessary | ||
if ($Response.Content.GetType() -eq [System.Byte[]]) { | ||
$StrContent = [System.Text.Encoding]::UTF8.GetString($Response.Content) |
Check warning
Code scanning / Psscriptanalyzer (reported by Codacy)
Line has trailing whitespace Warning
|
||
# Remove all newlines from the content | ||
$StrContent = [string]::join("",($StrContent.Split("`n"))) | ||
|
Check warning
Code scanning / Psscriptanalyzer (reported by Codacy)
Line has trailing whitespace Warning
|
||
if ($StatusCode -ne 200) { | ||
$err = "WARNING, connectivity to Huntress URL's is being interrupted. You MUST open port 443 for $($URL) in order for the Huntress agent to function." | ||
LogMessage $err |
Check warning
Code scanning / Psscriptanalyzer (reported by Codacy)
Line has trailing whitespace Warning
$connectivityTolerance -- | ||
} elseif (!$ContentMatch) { | ||
$err = "WARNING, successful connection to Huntress URL, however, content did not match expected. Ensure no proxy or content filtering is preventing access!" | ||
LogMessage $err |
Check warning
Code scanning / Psscriptanalyzer (reported by Codacy)
Line has trailing whitespace Warning
if ($connectivityTolerance -lt 0) { | ||
Write-Output "Please fix the closed port 443 for the above domains before attempting to install" -ForegroundColor white -BackgroundColor red | ||
$err = "Too many connections failed $($connectivityTolerance), exiting" | ||
LogMessage "$($err), $($SupportMessage)" |
Check warning
Code scanning / Psscriptanalyzer (reported by Codacy)
Line has trailing whitespace Warning
New network tester method is more compatible with legacy machines, this method was already present in our PoSh deploy it just hadn't been moved to this script yet.