diff --git a/CHANGELOG b/CHANGELOG index 87b84eeff..4f520605a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,8 @@ # Nmap Changelog ($Id$); -*-text-*- +o An "elapsed" attribute has been added to the XML output, representing + the total scan time in seconds (floating point). [Kris] + o When a system route can't be matched up directly with an interface by comparing addresses, Nmap now tries to match the route through another route. This helps for instance with a PPP connection where diff --git a/docs/nmap.dtd b/docs/nmap.dtd index 6af1d449c..8d627d040 100644 --- a/docs/nmap.dtd +++ b/docs/nmap.dtd @@ -323,6 +323,7 @@ diff --git a/output.cc b/output.cc index 5a9ac3d9d..d659338bb 100644 --- a/output.cc +++ b/output.cc @@ -1957,7 +1957,7 @@ void printfinaloutput() { Strncpy(mytime, ctime(&timep), sizeof(mytime)); chomp(mytime); - log_write(LOG_XML, "\n", (unsigned long) timep, mytime, o.numhosts_up, o.numhosts_scanned - o.numhosts_up, o.numhosts_scanned); + log_write(LOG_XML, "\n", (unsigned long) timep, mytime, o.TimeSinceStartMS(&tv) / 1000.0, o.numhosts_up, o.numhosts_scanned - o.numhosts_up, o.numhosts_scanned); log_write(LOG_XML, "\n", mytime, o.numhosts_scanned, (o.numhosts_scanned == 1)? "IP address" : "IP addresses", o.numhosts_up, (o.numhosts_up == 1)? "host" : "hosts", o.TimeSinceStartMS(&tv) / 1000.0 ); log_write(LOG_NORMAL|LOG_MACHINE, "# Nmap done at %s -- %d %s (%d %s up) scanned in %.2f seconds\n", mytime, o.numhosts_scanned, (o.numhosts_scanned == 1)? "IP address" : "IP addresses", o.numhosts_up, (o.numhosts_up == 1)? "host" : "hosts", o.TimeSinceStartMS(&tv) / 1000.0 );