Normal Output
The default Nmap output format is the normal, human-readable format. This output provides a comprehensive overview of the scan results, including information about the target hosts, open ports, running services, and operating system details. Here's an example of normal output:
Starting Nmap scan on 192.168.1.1
Nmap scan report for 192.168.1.1
Port State Service
22/tcp open ssh
80/tcp open http
443/tcp open https
XML Output
Nmap can generate output in XML format, which is a structured, machine-readable format. This output can be easily parsed and processed by other tools or scripts. To generate XML output, use the -oX
or --xml
option:
nmap -oX output.xml 192.168.1.1
The XML output provides a detailed, hierarchical representation of the scan results, including information about the target hosts, ports, services, and operating system details.
Greppable Output
Nmap's greppable output format is designed to be easily parsed using tools like grep
, awk
, or sed
. This format presents the scan results in a tabular format, with each line representing a single piece of information. To generate greppable output, use the -oG
or --grep
option:
nmap -oG output.txt 192.168.1.1
The greppable output can be useful for quickly extracting specific information from the scan results, such as open ports or running services.
Script Kiddie Output
The script kiddie output format is a simplified version of the normal output, designed for less experienced users. This format provides a more concise and user-friendly representation of the scan results, focusing on the most essential information. To generate script kiddie output, use the -oS
or --script-kiddie
option:
nmap -oS output.txt 192.168.1.1
The script kiddie output can be a good starting point for users who are new to Nmap and network scanning, as it presents the information in a more accessible way.
Understanding these different Nmap output formats and their use cases is crucial for effectively interpreting the results of your network scans and leveraging them for cybersecurity tasks.