Created
June 24, 2019 20:07
-
-
Save LarryWeiss/88e1075b7c4b334e2f96da40e0eb3cf9 to your computer and use it in GitHub Desktop.
This file contains 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
$results = echo (0..2) -pipelinevariable second | % { | |
echo (0..10) -pipelinevariable third | % { | |
echo (0..254) -pipelinevariable fourth | % { | |
$status = Test-NetConnection -CommonTCPPort HTTP "10.$second.$third.$_" | |
if ($status.TcpTestSucceeded) { | |
$results = Invoke-WebRequest -SkipCertificateCheck "10.$second.$third.$_" | |
if (Select-String -pattern "airos" -InputObject $results.Content) { | |
'10.'+$second+'.'+$third+'.'+$fourth | |
} | |
} | |
} | |
} | |
} | |
Add-Content -Path .\web.txt -Value $results -Force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment