Nmap Development mailing list archives

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


From: João Jerónimo <j_j_b_o_devel () yahoo com>
Date: Fri, 26 Aug 2016 09:56:37 +0100

Hello again,

I understand you argument, but shouldn't the hostname be always available in the output when it is entered in the command line?

João Jerónimo



Às 17:30 de 25-08-2016, Daniel Miller escreveu:
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 <mailto: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
    <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: