Nmap Development mailing list archives

Re: NMap grepable output always supresses hostnames when run with "-n"


From: Daniel Miller <bonsaiviking () gmail com>
Date: Thu, 25 Aug 2016 11:30:32 -0500

João,

Thanks for this patch. I appreciate the time and effort you've spent to
help us improve Nmap.

Unfortunately, the Grepable output format is deprecated, which means we
won't be changing it. Using NameIP() for this would result in unpredictable
output: sometimes the IP address would be present without (parentheses),
other times it would be the target hostname with the IP in parentheses, and
still other times it would be the discovered hostname and IP. The current
format always has the IP address as the second "word," always has
parentheses, and always uses the discovered (DNS PTR) hostname in those
parentheses if it is available. If you want more output (such as the
targetname, additional hostnames, etc.) then you must use the XML output,
which contains all of this information.

Thanks again. I look forward to seeing any other improvements or bug
reports you may submit.

Dan

On Tue, Aug 23, 2016 at 10:10 AM, João Jerónimo <j_j_b_o_devel () yahoo com>
wrote:

Hello,

I noticed that NMap grepable output always supresses hostnames when run
with "-n", even if the hosts were inserted as hostnames in the command line.

This patch fixes this by always using currenths->NameIP() method to print
the hostnames and IPs.

I'm not sure if this is the best way to fix the bug.

Best regards,
João Jerónimo


_______________________________________________
Sent through the dev mailing list
https://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/

_______________________________________________
Sent through the dev mailing list
https://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/

Current thread: