Using --scan-delay always implies a parallelism of 1. Change the fatal

error

You can't use --max-parallelism with --scan-delay.
QUITTING!

to a warning

Warning: --min-parallelism and --max-parallelism are ignored with --scan-delay.
This commit is contained in:
david 2009-07-17 20:06:05 +00:00
parent 3a4a181f2d
commit 5c33e639ae
2 changed files with 4 additions and 6 deletions

View file

@ -2500,9 +2500,8 @@ reasonable, though I only adjust this value as a last resort.</para>
<para>The <option>--max-parallelism</option> option is sometimes set to one
to prevent Nmap from sending more than one probe at a time to hosts.
This can be useful in combination with <option>--scan-delay</option>
(discussed later), although the latter usually serves the purpose well
enough by itself.</para>
The <option>--scan-delay</option> option, discussed later, is another
way to do this.</para>
</listitem>
</varlistentry>

View file

@ -1339,9 +1339,8 @@ int nmap_main(int argc, char *argv[]) {
if (o.scan_delay > o.maxTCPScanDelay()) o.setMaxTCPScanDelay(o.scan_delay);
if (o.scan_delay > o.maxUDPScanDelay()) o.setMaxUDPScanDelay(o.scan_delay);
if (o.scan_delay > o.maxSCTPScanDelay()) o.setMaxSCTPScanDelay(o.scan_delay);
o.max_parallelism = 1;
if(pre_max_parallelism != -1)
fatal("You can't use --max-parallelism with --scan-delay.");
if (pre_max_parallelism != -1 || o.min_parallelism != -1)
error("Warning: --min-parallelism and --max-parallelism are ignored with --scan-delay.");
}
if (pre_max_scan_delay != -1) {
o.setMaxTCPScanDelay(pre_max_scan_delay);