mirror of
https://github.com/nmap/nmap.git
synced 2026-01-07 06:59:03 +00:00
Add an enclosing host element in XML output for timed-out hosts.
The lack of this was noticed by Rémi Mollon.
This commit is contained in:
6
nmap.cc
6
nmap.cc
@@ -1920,7 +1920,13 @@ int nmap_main(int argc, char *argv[]) {
|
||||
currenths = Targets[targetno];
|
||||
/* Now I can do the output and such for each host */
|
||||
if (currenths->timedOut(NULL)) {
|
||||
xml_open_start_tag("host");
|
||||
xml_attribute("starttime", "%lu", (unsigned long) currenths->StartTime());
|
||||
xml_attribute("endtime", "%lu", (unsigned long) currenths->EndTime());
|
||||
xml_close_start_tag();
|
||||
write_host_header(currenths);
|
||||
xml_end_tag(); /* host */
|
||||
xml_newline();
|
||||
log_write(LOG_PLAIN,"Skipping host %s due to host timeout\n",
|
||||
currenths->NameIP(hostname, sizeof(hostname)));
|
||||
log_write(LOG_MACHINE,"Host: %s (%s)\tStatus: Timeout",
|
||||
|
||||
Reference in New Issue
Block a user