Nmap Development mailing list archives

Re: Wrong XML output in some cases


From: David Fifield <david () bamsoftware com>
Date: Fri, 8 Jul 2011 10:15:33 -0700

On Fri, Jul 08, 2011 at 04:37:38PM +0200, Remi Mollon wrote:
Dear Nmap developers,

First of all, I'm gonna introduce myself.

I'm Remi Mollon, working at CERN, as part of the Security Team.

Thanks to nmap, we do regular scans of (most of) all our devices, using
the XML output in order to integrate the results in our security
management system.

In some cases, it seems that the produced XML is wrong, with "status"
and "hostnames" tags outside a "host" tag, which isn't possible
according to the DTD.

The bug has been introduced as of nmap-5.30.

The fix is rather simple: put the line "write_host_header(currenths);"
between "xml_start_tag("host");" and "xml_end_tag();" at the following
lines:

- nmap-5.51: line 1872
- nmap-5.52.IPv6.Beta2: line 1911
- nmap-5.59BETA1: line 1923

Thank you, RĂ©mi, this was correct. The host element was being omitted in
the case of a host timeout. I have applied your suggested fix.

David Fifield
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/

Current thread: