diff --git a/CHANGELOG b/CHANGELOG index fe5ba3301..ce9044669 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,9 @@ #Nmap Changelog ($Id$); -*-text-*- +o Setting --host-timeout=0 will disable the host timeout, which is set by -T5 + to 15 minutes. Earlier versions of Nmap require the user to specify a very + long timeout instead. + o If a host times out, the XML element will have the attribute timedout="true" and the host's timing info (srtt etc.) will still be printed. diff --git a/docs/refguide.xml b/docs/refguide.xml index a37ddb462..b1c89e317 100644 --- a/docs/refguide.xml +++ b/docs/refguide.xml @@ -2782,6 +2782,10 @@ scanning other hosts at the same time during that half an hour, so it isn't a co No port table, OS detection, or version detection results are printed for that host. +The special value 0 can be used to mean no + timeout, which can be used to override the + timing template, which sets the host timeout to 15 minutes. + @@ -2804,6 +2808,10 @@ for that host. target host or port and the timeout period will be reset for the next instance. +The special value 0 can be used to mean no + timeout, which can be used to override the + timing template, which sets the script timeout to 10 minutes. + diff --git a/nmap.cc b/nmap.cc index 1eb0b3aea..708034c05 100644 --- a/nmap.cc +++ b/nmap.cc @@ -712,8 +712,9 @@ void parse_options(int argc, char **argv) { } } else if (strcmp(long_options[option_index].name, "host-timeout") == 0) { l = tval2msecs(optarg); - if (l <= 0) + if (l < 0) fatal("Bogus --host-timeout argument specified"); + // if (l == 0) this is the default "no timeout" value, overriding timing template if (l >= 10000 * 1000 && tval_unit(optarg) == NULL) fatal("Since April 2010, the default unit for --host-timeout is seconds, so your time of \"%s\" is %.1f hours. If this is what you want, use \"%ss\".", optarg, l / 1000.0 / 60 / 60, optarg); delayed_options.pre_host_timeout = l; @@ -753,6 +754,7 @@ void parse_options(int argc, char **argv) { l = tval2msecs(optarg); if (l < 0) fatal("Bogus --scan-delay argument specified."); + // if (l == 0) this is the default "no delay" value, overriding timing template if (l >= 100 * 1000 && tval_unit(optarg) == NULL) fatal("Since April 2010, the default unit for --scan-delay is seconds, so your time of \"%s\" is %.1f minutes. Use \"%sms\" for %g milliseconds.", optarg, l / 1000.0 / 60, optarg, l / 1000.0); delayed_options.pre_scan_delay = l;