Skip to content

Instantly share code, notes, and snippets.

@l4p4
Created May 6, 2016 03:31
Show Gist options
  • Save l4p4/793eb2351bcc5c424e2078734c6efeda to your computer and use it in GitHub Desktop.
Save l4p4/793eb2351bcc5c424e2078734c6efeda to your computer and use it in GitHub Desktop.
IP Scanning with range and Scanning Operating system on target IP
nmap -sP 192.168.25.1/24 | grep -v 'Starting\|done' | awk "{if (length($1) > 35) print $1}" | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' | while read i; do echo -e "\n\t\t[!] Analyzing IP[${i}]"; nmap -O $i; done
@l4p4
Copy link
Author

l4p4 commented May 6, 2016

nmap -sP 192.168.25.1/24 #IP Scanning with range
| grep -v 'Starting|done' #Ignore first and last line
| awk "{if (length($1) > 35) print $1}" #Get just IP alive
| grep -o '[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}' #Get IPv4 of string
| while read i; do echo -e "\n\t\t[!] Analyzing IP[${i}]"; nmap -O $i; done #Scanning OS on target IP

Try with "nmap -O --trace-route"

:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment