Output Flashcards
Normal output to the file normal.file
-oN
nmap 192.168.1.1 -oN normal.file
XML output to the file xml.file
-oX
nmap 192.168.1.1 -oX xml.file
Grepable output to the file grep.file
-oG
nmap 192.168.1.1 -oG grep.file
Output in the three major formats at once
-oA
nmap 192.168.1.1 -oA results
Grepable output to screen. -oN -, -oX - also usable
-oG -
nmap 192.168.1.1 -oG -
Append a scan to a previous scan file
–append-output
nmap 192.168.1.1 -oN file.file –append-output
Increase the verbosity level (use -vv or more for greater effect)
-v
nmap 192.168.1.1 -v
Increase debugging level (use -dd or more for greater effect)
-d
nmap 192.168.1.1 -d
Display the reason a port is in a particular state, same output as -vv
–reason
nmap 192.168.1.1 –reason
Only show open (or possibly open) ports
–open
nmap 192.168.1.1 –open
Show all packets sent and received
–packet-trace
nmap 192.168.1.1 -T4 –packet-trace
Shows the host interfaces and routes
–iflist
nmap –iflist
Resume a scan
–resume
nmap –resume results.file
Example: Scan for web servers and grep to show which IPs are running web servers
nmap -p80 -sV -oG - –open 192.168.1.1/24 | grep open
Example: Generate a list of the IPs of live hosts
nmap -iR 10 -n -oX out.xml | grep “Nmap” | cut -d “ “ -f5 > live-hosts.txt