Although seeing the results of scans on a case by case basis is very helpful in the short term; for longer assessment times (or for larger scans that would scroll off the screen), it's a good idea to log scans to file.
Nmap supports three different types of logging. Each type has a different flag to log that specific log type, and different purposes. Fortunately for us, the Nmap development team was smart enough to think ahead; using the -oA
(output all) flag, it's possible to output all three log files. The second parameter to this flag is simply the base name of the logs. They will automatically have their own unique file extension.
As you can see in the preceding screenshot, Nmap automatically saves all three log file extensions (.xml
, .nmap
, and .gnmap
) with the base file name specified in the -oA
flag.
As you can see, after running a scan with the -oA logbase
flag, there are now three files in the current directory. We now have a .xml
file, which contains the results of the...