mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-07-05 20:41:39 -07:00
-c enforces -t 1 now
This commit is contained in:
parent
b43514dc45
commit
abb83694aa
1 changed files with 6 additions and 4 deletions
10
hydra.c
10
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue