mailing list archives
Log bogus targets in XML
From: David Fifield <david () bamsoftware com>
Date: Thu, 26 Apr 2012 23:53:49 -0700
Currently if you give Nmap a syntactically invalid target specification
or one that can't be resolved, you get warnings like these:
$ ./nmap 1:2 3.4.5 '[22.214.171.124]'
Starting Nmap 5.61TEST5 ( http://nmap.org ) at 2012-04-26 23:51 PDT
Invalid host expression: 1:2 -- colons only allowed in IPv6 addresses, and then you need the -6 switch
Invalid target host specification: 3.4.5
Invalid character in host specification: [126.96.36.199]. Note in particular that square brackets  are no longer allowed.
They were redundant and can simply be removed.
However there's no machine-readable way to see that this happened, other
than to read stderr. Here is a patch that adds this information to the
XML output in a new target element.
<target specification="1:2" status="skipped"/>
<target specification="3.4.5" status="skipped"/>
<target specification="[188.8.131.52]" status="skipped"/>
Sent through the nmap-dev mailing list
Archived at http://seclists.org/nmap-dev/
- Log bogus targets in XML David Fifield (Apr 27)