O'Reilly logo

Kali Linux Cookbook - Second Edition by Bob Perciaccante, Corey P. Schultz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The nmap output formats

There are several types of output that you can use for simple logging of the data, logging in an XML format for potential input into another program, or outputting for grep:

nmap -oN filename.txt

N is a standard default text output format

nmap -oG filename.txt

G is a format so you can better run grep against the file

nmap -oX filename.xml

X is for an XML format

Let's take a simple scan and output it to a file for grep:

nmap -p- -oG 192_168_56_102.txt 192.168.56.102

You will see the output on the screen, and it will also output to a TXT file in your home directory, which you can use as a target for grep:

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required