Open
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
|
|
||
| # Remove all newlines from the content | ||
| $StrContent = [string]::join("",($StrContent.Split("`n"))) | ||
|
|
Check warning
Code scanning / Psscriptanalyzer (reported by Codacy)
Line has trailing whitespace
|
|
||
| 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
| $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
| 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.