From abb83694aad34a63a8c83be78932c14e8bd5b844 Mon Sep 17 00:00:00 2001 From: van Hauser Date: Tue, 27 Jun 2017 11:14:56 +0200 Subject: [PATCH] -c enforces -t 1 now --- hydra.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hydra.c b/hydra.c index e0eb9a4..94310b4 100644 --- a/hydra.c +++ b/hydra.c @@ -2352,10 +2352,7 @@ int main(int argc, char *argv[]) { if (hydra_options.time_next_attempt < 0) { fprintf(stderr, "[ERROR] -c option value can not be negative\n"); exit(-1); - } else if (hydra_options.time_next_attempt > 0) { - printf("[INFO] setting max tasks per host to 1 due to -c option usage\n"); - hydra_options.tasks = 1; - } + } #else fprintf(stderr, "[WARNING] -c option can not be used as your operating system is missing the MSG_PEEK feature\n"); #endif @@ -2399,6 +2396,11 @@ int main(int argc, char *argv[]) { } } + if (hydra_options.time_next_attempt > 0 && hydra_options.tasks != 1) { + printf("[INFO] setting max tasks per host to 1 due to -c option usage\n"); + hydra_options.tasks = 1; + } + //check if output is redirected from the shell or in a file if (colored_output && !isatty(fileno(stdout))) colored_output = 0;