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:
8
nmap.cc
8
nmap.cc
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user