Saving scan results in a normal format
Nmap supports different formats to save scan results. Depending on your needs, you can choose between a normal, XML, and grepable output. If you don't set an output option, normal output mode is used by default. The normal mode saves the output as you see it on your screen minus the runtime information. This mode presents the findings in a well-structured and easy-to-understand manner.
This recipe shows you how to save the Nmap scan results to a file in the normal mode.
How to do it...
To save the scan results to a file in a normal output format, add the option -oN <filename>
. This option only affects the output format and can be combined with any port or host scanning technique (and of course, any other Nmap option):
$ nmap -oN <output file> <target>
After the scan is complete, the output should be saved now in the specified file:
$ nmap -oN scanme.txt scanme.nmap.org
$ cat scanme.txt
# Nmap 7.40SVN scan initiated Thu Dec 29 13:25...