Any security tool is only as useful as the output it generates. Given the
number of ways Nmap is used by people and other software, no single format can
please everyone. So Nmap offers several formats, including the interactive
mode for humans to read directly and XML for easy parsing by software.
First things first, you can use the help command for Nmap by typing nmap -h.
- Requests that normal output is directed to the given filename.
- Similar to interactive except that it displays less runtime information and warnings since it is expected to be analyzed after the scan completes rather than interactively.
XML Output (-oX <filespec>)
- Requests that XML output is directed to the given filename.
- The XML output references an XSL stylesheet which can be used to format the results as HTML.
- By default, this will only work on the machine you ran Nmap on or a similarly configured one due to the hard-coded nmap.xsl filesystem path.
- Use the --webxml (provides an online version nmap.xsl) or --stylesheet <location> (you can define any stylesheet here) options to create portable XML files that render as HTML on any web-connected machine. Example:--stylesheet https://nmap.org/svn/docs/nmap.xsl (this is similar to defining --webxml)
Script Kidde Output (-oS <filespec>)
- Script kiddie output is like interactive output
- Except that it is post-processed to better suit the l33t (Leet speak) HaXXorZ (Hacker Style).
Grepable Output (-oG <filespec>)
- This output format is covered last because it is deprecated. The XML output format is far more powerful and is nearly as convenient for experienced users.
- If you save the file in this format you can search the file using grep command using CLI. Example: (suppose file name is grep.file)
cat grep.file | grep <search/display keywords>
Output all formats (-oA <basename>)
- Stores scan results in normal, XML, and grepable formats at once. They are stored in <basename>.nmap, <basename>.xml, and <basename>.gnmap, respectively.
We hope this helps. If any suggestions or doubts you can add a comment and
we will reply as soon as possible.
No comments:
Post a Comment