Nmap Development mailing list archives

Re: Wrong XML output in some cases


From: David Fifield <david () bamsoftware com>
Date: Tue, 12 Jul 2011 09:26:59 -0700

On Tue, Jul 12, 2011 at 02:17:24PM +0200, Remi Mollon wrote:
On 07/08/2011 07:15 PM, David Fifield wrote:
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

Hi David,

Ok, I guess this means that you don't need the "diff -u" patch.

That's correct. Next time, if you have a patch, just attach it to your
initial bug report; I didn't know you were offering one. "svn diff" is
probably easier than "diff -u".

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: