From 5c33e639ae304fd223d172e0c8ba95018c33e860 Mon Sep 17 00:00:00 2001 From: david Date: Fri, 17 Jul 2009 20:06:05 +0000 Subject: [PATCH] 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. --- docs/refguide.xml | 5 ++--- nmap.cc | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/refguide.xml b/docs/refguide.xml index 03f73b6df..6c2baa535 100644 --- a/docs/refguide.xml +++ b/docs/refguide.xml @@ -2500,9 +2500,8 @@ reasonable, though I only adjust this value as a last resort. The 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 -(discussed later), although the latter usually serves the purpose well -enough by itself. +The option, discussed later, is another +way to do this. diff --git a/nmap.cc b/nmap.cc index 532a282e6..69cff0c29 100644 --- a/nmap.cc +++ b/nmap.cc @@ -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);