mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-08-22 06:13:55 -07:00
Update hydra.c
In line 3907, added an `if` statement to prevent the overflow of long unsigned int value "-1".
This commit is contained in:
parent
c83a71ae87
commit
fe1276ecb2
1 changed files with 1 additions and 0 deletions
1
hydra.c
1
hydra.c
|
@ -3904,6 +3904,7 @@ int main(int argc, char *argv[]) {
|
|||
for (j = 0; j < hydra_options.max_use; j++)
|
||||
if (hydra_heads[j]->active >= 0)
|
||||
k++;
|
||||
if ((long)(hydra_brains.todo_all - hydra_brains.sent) <= 0) exit(0); //in case of overflow of unsigned "-1"
|
||||
printf("[STATUS] %.2f tries/min, %lu tries in %02lu:%02luh, %lu to do in %02lu:%02luh, %d active\n", (1.0 * hydra_brains.sent) / (((elapsed_status - starttime) * 1.0) / 60), // tries/min
|
||||
hydra_brains.sent, // tries
|
||||
(long unsigned int) ((elapsed_status - starttime) / 3600), // hours
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue