1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-17 13:09:02 +00:00

o An "elapsed" attribute has been added to the XML output, representing

the total scan time in seconds (floating point).
This commit is contained in:
kris
2009-01-05 05:57:35 +00:00
parent 3ed62451bb
commit 20ec1c416e
3 changed files with 5 additions and 1 deletions

View File

@@ -1,5 +1,8 @@
# Nmap Changelog ($Id$); -*-text-*- # 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 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 by comparing addresses, Nmap now tries to match the route through
another route. This helps for instance with a PPP connection where another route. This helps for instance with a PPP connection where

View File

@@ -323,6 +323,7 @@
<!ELEMENT finished EMPTY > <!ELEMENT finished EMPTY >
<!ATTLIST finished time %attr_numeric; #REQUIRED <!ATTLIST finished time %attr_numeric; #REQUIRED
timestr CDATA #IMPLIED timestr CDATA #IMPLIED
elapsed %attr_numeric; #REQUIRED
> >
<!ELEMENT hosts EMPTY > <!ELEMENT hosts EMPTY >

View File

@@ -1957,7 +1957,7 @@ void printfinaloutput() {
Strncpy(mytime, ctime(&timep), sizeof(mytime)); Strncpy(mytime, ctime(&timep), sizeof(mytime));
chomp(mytime); chomp(mytime);
log_write(LOG_XML, "<runstats><finished time=\"%lu\" timestr=\"%s\"/><hosts up=\"%d\" down=\"%d\" total=\"%d\" />\n", (unsigned long) timep, mytime, o.numhosts_up, o.numhosts_scanned - o.numhosts_up, o.numhosts_scanned); log_write(LOG_XML, "<runstats><finished time=\"%lu\" timestr=\"%s\" elapsed=\"%.2f\"/><hosts up=\"%d\" down=\"%d\" total=\"%d\" />\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, "<!-- 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 ); log_write(LOG_XML, "<!-- 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 );
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 ); 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 );