Nmap Development mailing list archives

Re: Bug report | error in xml output file


From: David Fifield <david () bamsoftware com>
Date: Wed, 18 May 2016 19:38:00 -0700

On Tue, May 17, 2016 at 08:25:25AM -0400, I wrote:
Hi! I run nmap 7.12 on ubuntu 12.04 (i686). Scan over 1.5k host and output to
file. Example command `nmap -A -Pn -Sv -iL in.txt -oX nmap_output.xml`. If scan
ok, i want to parse xml, but xml generate with error.

~/Desktop [ chidley -G nmap_output.xml ] 3:13
2016/05/17 15:13:39 extractor.go:56: XML syntax error on line 1000: unescaped
< inside quoted string
2016/05/17 15:13:39 chidley.go:142: FATAL ERROR: XML syntax error on line
1000: unescaped < inside quoted string
Look up 1000 string
~/Desktop [ sed -n "1000p" gnmap_output.xml ] 3:13
<address addr="*.*.*.*" addrtype="ip<host starttime="1463472789" endtime=
"1463473357"><status state="up" reason="user-set"/>
I think `addrtype="ip` need close quote.

Also, i not see this bug if scan small count hosts, ~ 200.

This is a strange error; it almost looks like some kind of concurrency
issue. Did you perhaps run with --resume and an already existing XML
output file?

There is no place in the code that could output an 'addrtype="ip' like
that. The only possibilities are 'addrtype="mac"', 'addrtype="ipv4"', or
'addrtype="ipv6"'. It seems more likely that a write operation happened
to be split right after 'ip' and then another write operation
intervened. Perhaps you have some file system corruption?
_______________________________________________
Sent through the dev mailing list
https://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/


Current thread: