Created
December 17, 2020 07:12
-
-
Save rdapaz/87fdae1cabd6e18314d90ead2736ef46 to your computer and use it in GitHub Desktop.
Use Powershell as a port scanner
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
$range_of_ports = 1500 .. 1505 | |
$ip = "10.230.149.232" | |
$range_of_ports | % { echo ((new-object Net.sockets.TCPClient).Connect($ip,$_)) (" Port $_ is open!") } 2>$null | |
https://www.sans.org/blog/pen-test-poster-white-board-powershell-built-in-port-scanner/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment