Created
June 4, 2020 07:37
-
-
Save wuping2004/66a6611e52c5764fdd64a7ff5b5c476d 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
$ip = "127.0.0.1" | |
$a = @(1025..1027) | |
$b = @(19000..19010) | |
$c = 445,139 | |
$port = $a + $b + $c | |
$(Foreach($item in $port) | |
{ | |
$res = Test-NetConnection -ComputerName $ip -Port $item -InformationLevel Quiet | |
Write-host "Scanning" $ip : $item $res | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment