diff --git a/CHANGELOG b/CHANGELOG index 80dd37b84..c715d1d94 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,9 +1,22 @@ # Nmap Changelog ($Id$) +Nmap 3.92 + +o Modified Libpcap's configure.ac to compile with the + --fno-strict-aliasing option if gcc 4.X is used. This prevents when + said compiler is used. This was done for Nmap in 3.90, but is + apparently needed for pcap too. Thanks to Craig Humphrey + (Craig.Humphrey(a)chapmantripp.com) for the discovery. + o Patched libdnet to include sys/uio.h in src/tun-linux.c. This is apparently necessary on some Glibc 2.1 systems. Thanks to Rob Foehl (rwf(a)loonybin.net) for the patch. +o Fixed a crash which could occur when a ridiculously short + --host_timeout was specified on Windows (or on UNIX if --send_eth was + specified). Thanks to Ole Morten Grodaas (grodaas(a)gmail.com) for + discovering the problem. + Nmap 3.91 o Fixed a crash on Windows when you -P0 scan an unused IP on a local diff --git a/docs/nmap.usage.txt b/docs/nmap.usage.txt index 0ac82ee27..f3ed76e9d 100644 --- a/docs/nmap.usage.txt +++ b/docs/nmap.usage.txt @@ -1,4 +1,4 @@ -Nmap 3.91 Usage: nmap [Scan Type(s)] [Options] +Nmap 3.92 Usage: nmap [Scan Type(s)] [Options] Some Common Scan Types ('*' options require root privileges) * -sS TCP SYN stealth port scan (default if privileged (root)) -sT TCP connect() port scan (default for unprivileged users) diff --git a/nmap.cc b/nmap.cc index 630baf172..cda007f9d 100644 --- a/nmap.cc +++ b/nmap.cc @@ -371,7 +371,7 @@ int nmap_main(int argc, char *argv[]) { fatal("host_timeout is given in milliseconds and must be greater than 200"); } if (o.host_timeout <= 1000) { - error("host_timeout is given in milliseconds, so you specified less than a second (%dms). This is allowed but not recommended.". o.host_timeout); + error("host_timeout is given in milliseconds, so you specified less than a second (%lims). This is allowed but not recommended.", o.host_timeout); } } else if (strcmp(long_options[option_index].name, "ttl") == 0) { o.ttl = atoi(optarg); diff --git a/targets.cc b/targets.cc index 4b505faf2..1c77803f5 100644 --- a/targets.cc +++ b/targets.cc @@ -298,6 +298,7 @@ struct intf_entry *ifentry; u32 ifbuf[200] ; struct route_nfo rnfo; bool arpping_done = false; + struct timeval now; ifentry = (struct intf_entry *) ifbuf; ifentry->intf_len = sizeof(ifbuf); // TODO: May want to use a larger buffer if interface aliases prove important. @@ -411,11 +412,12 @@ if (hs->randomize) { arpping_done = true; } + gettimeofday(&now, NULL); if ((o.sendpref & PACKET_SEND_ETH) && hs->hostbatch[0]->ifType() == devt_ethernet) { for(i=0; i < hs->current_batch_sz; i++) if (!(hs->hostbatch[i]->flags & HOST_DOWN) && - !hs->hostbatch[i]->timedOut()) + !hs->hostbatch[i]->timedOut(&now)) if (!setTargetNextHopMAC(hs->hostbatch[i])) fatal("%s: Failed to determine dst MAC address for target %s", __FUNCTION__, hs->hostbatch[hidx]->NameIP()); @@ -426,7 +428,7 @@ if (hs->randomize) { /* Then we do the mass ping (if required - IP-level pings) */ if ((*pingtype == PINGTYPE_NONE && !arpping_done) || hs->hostbatch[0]->ifType() == devt_loopback) { for(i=0; i < hs->current_batch_sz; i++) { - if (hs->hostbatch[i]->timedOut()) { + if (hs->hostbatch[i]->timedOut(&now)) { initialize_timeout_info(&hs->hostbatch[i]->to); hs->hostbatch[i]->flags |= HOST_UP; /*hostbatch[i].up = 1;*/ }