diff --git a/sslscan.c b/sslscan.c index abe3d69..13b1b57 100644 --- a/sslscan.c +++ b/sslscan.c @@ -3997,7 +3997,8 @@ int main(int argc, char *argv[]) else if (strncmp("--connect-timeout=", argv[argLoop], 18) == 0) options->connect_timeout = atoi(argv[argLoop] + 18); - // Sleep between requests (ms) + // Sleep between requests (ms). Accept both `--sleep=` and + // `--sleep ` (issue #357 — the latter form silently did nothing). else if (strncmp("--sleep=", argv[argLoop], 8) == 0) { msec = atoi(argv[argLoop] + 8); @@ -4005,6 +4006,19 @@ int main(int argc, char *argv[]) options->sleep = msec; } } + else if (strcmp("--sleep", argv[argLoop]) == 0) + { + if (argLoop + 1 >= argc) + { + printf("%s--sleep%s requires a value in milliseconds (e.g. --sleep 100 or --sleep=100)\n", COL_RED, RESET); + exit(1); + } + argLoop++; + msec = atoi(argv[argLoop]); + if (msec >= 0) { + options->sleep = msec; + } + } // RDP Preamble... else if (strcmp("--rdp", argv[argLoop]) == 0)