Skip to content

Instantly share code, notes, and snippets.

@ffcommax
Created December 4, 2021 18:07
Show Gist options
  • Save ffcommax/545102001ff50f2710b2ff0673759a81 to your computer and use it in GitHub Desktop.
Save ffcommax/545102001ff50f2710b2ff0673759a81 to your computer and use it in GitHub Desktop.
Simple_Port_scanner
1..255 | % { $a = $_; 135,389,3389,445,5986 | % {"10.0.61.$a";echo ((new-object Net.Sockets.TcpClient).Connect("10.0.61.$a",$_)) "Port $_ is open!"} 2>$null}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment