mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Allow --host-timeout=0 to override the timeout of -T5.
This commit is contained in:
@@ -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 <host> element will have the attribute
|
||||
timedout="true" and the host's timing info (srtt etc.) will still be printed.
|
||||
|
||||
|
||||
@@ -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.</para>
|
||||
|
||||
<para>The special value <literal>0</literal> can be used to mean <quote>no
|
||||
timeout</quote>, which can be used to override the <option>T5</option>
|
||||
timing template, which sets the host timeout to 15 minutes.</para>
|
||||
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
@@ -2804,6 +2808,10 @@ for that host.</para>
|
||||
target host or port and the timeout period will be reset for
|
||||
the next instance.</para>
|
||||
|
||||
<para>The special value <literal>0</literal> can be used to mean <quote>no
|
||||
timeout</quote>, which can be used to override the <option>T5</option>
|
||||
timing template, which sets the script timeout to 10 minutes.</para>
|
||||
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
4
nmap.cc
4
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;
|
||||
|
||||
Reference in New Issue
Block a user