Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion sslscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -3997,14 +3997,28 @@ 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=<ms>` and
// `--sleep <ms>` (issue #357 — the latter form silently did nothing).
else if (strncmp("--sleep=", argv[argLoop], 8) == 0)
{
msec = atoi(argv[argLoop] + 8);
if (msec >= 0) {
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)
Expand Down