1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-02 12:59:02 +00:00

XML output: include host times and a flag if the host timed out

This commit is contained in:
dmiller
2021-05-07 22:08:44 +00:00
parent f17fa67008
commit 14c7f87d6f
3 changed files with 7 additions and 0 deletions

View File

@@ -1,5 +1,8 @@
#Nmap Changelog ($Id$); -*-text-*-
o If a host times out, the XML <host> element will have the attribute
timedout="true" and the host's timing info (srtt etc.) will still be printed.
o [GH#2269] Fix an issue with -sU where payload data went out-of-scope before
it was used, causing corrupted payloads to be sent. [Mariusz Ziulek]

View File

@@ -47,6 +47,7 @@
<!ENTITY % attr_ipaddr "CDATA" >
<!ENTITY % attr_percent "CDATA" >
<!ENTITY % attr_type "(ipv4 | ipv6 | mac)" >
<!ENTITY % attr_bool "(true | false)" >
<!ENTITY % host_states "(up|down|unknown|skipped)" >
@@ -147,6 +148,7 @@
<!ATTLIST host
starttime %attr_numeric; #IMPLIED
endtime %attr_numeric; #IMPLIED
timedout %attr_bool; #IMPLIED
comment CDATA #IMPLIED
>

View File

@@ -2228,8 +2228,10 @@ int nmap_main(int argc, char *argv[]) {
xml_open_start_tag("host");
xml_attribute("starttime", "%lu", (unsigned long) currenths->StartTime());
xml_attribute("endtime", "%lu", (unsigned long) currenths->EndTime());
xml_attribute("timedout", "true");
xml_close_start_tag();
write_host_header(currenths);
printtimes(currenths);
xml_end_tag(); /* host */
xml_newline();
log_write(LOG_PLAIN, "Skipping host %s due to host timeout\n",