1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-23 22:59:20 +00:00

Only write host elements for down hosts to XML in verbose mode. This

makes it consistent with other output formats.
This commit is contained in:
david
2010-03-12 21:20:05 +00:00
parent 5b00a325c0
commit 5318dd3c58

View File

@@ -1766,9 +1766,11 @@ int nmap_main(int argc, char *argv[]) {
/* I used to check that !currenths->weird_responses, but in some
rare cases, such IPs CAN be port successfully scanned and even connected to */
if (!(currenths->flags & HOST_UP)) {
log_write(LOG_XML, "<host>");
write_host_header(currenths);
log_write(LOG_XML, "</host>\n");
if (o.verbose) {
log_write(LOG_XML, "<host>");
write_host_header(currenths);
log_write(LOG_XML, "</host>\n");
}
delete currenths;
o.numhosts_scanned++;
continue;