Advertisement
egy-mast3r

nmap_examples

Jul 24th, 2014
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.51 KB | None | 0 0
  1.    
  2.  
  3.     Ping a subnet:
  4.     nmap -n -sP 172.16.0.0/16 -oG - | cut -d' ' -f2,4 | cut -d' ' -f1 | grep ^[0-9] >> 172.16.txt
  5.      
  6.     From a target list:
  7.     nmap -n -sP -iL HQWorkstations.txt -oG - | cut -d' ' -f2,4 | cut -d' ' -f1 | grep ^[0-9] >> HQWork.txt
  8.      
  9.     For a specific port or ports:
  10.     nmap -p445 -Pn 192.168.1.1/24 -oG - | grep 445/open | cut -d' ' -f2 >> smb.txt
  11.      
  12.     Get a number of live systems when using -Pn
  13.      
  14.     cat FileName.gnmap | grep "Status: Up" | cut -d' ' -f2 | wc -l
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement