Skip to content

Instantly share code, notes, and snippets.

@troyth
Created December 6, 2013 21:42
Show Gist options
  • Save troyth/7832605 to your computer and use it in GitHub Desktop.
Save troyth/7832605 to your computer and use it in GitHub Desktop.
nmap -Pn -p22 -oG - '192.168.1.*' | grep open
namap: Network exploration tool and security / port scanner
-Pn: Disable pinging of ips before scanning them - some of the Pi's didn't respond fast enough for this
-p22: Scan on port 22 (ssh) and see if anything responds
-oG - : Sets the output to "greppable" output and outputs it to your terminal (standard out). Greppable output puts all the info you need on every line so you can easily filter it
'192.168.1.*': All the addresses on the nertwork started with 192.168.1, the * says just scan all of the ips in this network.
| grep open: takes the output of nmap and filters it for the word "open"
(note: copied from an email from Francis Gulotta)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment