mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-07-06 04:51:40 -07:00
fix disappearing targets
This commit is contained in:
parent
5a451ba541
commit
1edef892f6
2 changed files with 10 additions and 4 deletions
1
CHANGES
1
CHANGES
|
@ -12,6 +12,7 @@ Release 9.3-dev
|
|||
after the password is found
|
||||
* fix to support IPv6 addresses in -M
|
||||
* fix to test all entries in -C files, not exiting after the first found
|
||||
* attempt to make disappearing targets faster to terminate on
|
||||
* added "make uninstall"
|
||||
|
||||
|
||||
|
|
13
hydra.c
13
hydra.c
|
@ -1487,7 +1487,7 @@ void hydra_increase_fail_count(int32_t target_no, int32_t head_no) {
|
|||
hydra_heads[head_no]->current_pass_ptr = empty_login;
|
||||
}
|
||||
if (hydra_targets[target_no]->fail_count >= MAXFAIL + hydra_options.tasks * hydra_targets[target_no]->ok) {
|
||||
if (hydra_targets[target_no]->done == TARGET_ACTIVE && hydra_options.max_use == hydra_targets[target_no]->failed) {
|
||||
if (hydra_targets[target_no]->done == TARGET_ACTIVE && hydra_options.max_use <= hydra_targets[target_no]->failed) {
|
||||
if (hydra_targets[target_no]->ok == 1)
|
||||
hydra_targets[target_no]->done = TARGET_ERROR; // mark target as done by errors
|
||||
else
|
||||
|
@ -1497,12 +1497,15 @@ void hydra_increase_fail_count(int32_t target_no, int32_t head_no) {
|
|||
"[ERROR] Too many connect errors to target, disabling "
|
||||
"%s://%s%s%s:%d\n",
|
||||
hydra_options.service, hydra_targets[target_no]->ip[0] == 16 && strchr(hydra_targets[target_no]->target, ':') != NULL ? "[" : "", hydra_targets[target_no]->target, hydra_targets[target_no]->ip[0] == 16 && strchr(hydra_targets[target_no]->target, ':') != NULL ? "]" : "", hydra_targets[target_no]->port);
|
||||
} else {
|
||||
hydra_targets[target_no]->failed++;
|
||||
}
|
||||
if (hydra_brains.targets > hydra_brains.finished)
|
||||
if (hydra_brains.targets <= hydra_brains.finished)
|
||||
hydra_kill_head(head_no, 1, 0);
|
||||
else
|
||||
hydra_kill_head(head_no, 1, 2);
|
||||
} // we keep the last one alive as long as it make sense
|
||||
}
|
||||
// we keep the last one alive as long as it make sense
|
||||
} else {
|
||||
// we need to put this in a list, otherwise we fail one login+pw test
|
||||
if (hydra_targets[target_no]->done == TARGET_ACTIVE && hydra_options.skip_redo == 0 && hydra_targets[target_no]->redo <= hydra_options.max_use * 2 && ((hydra_heads[head_no]->current_login_ptr != empty_login && hydra_heads[head_no]->current_pass_ptr != empty_login) || (hydra_heads[head_no]->current_login_ptr != NULL && hydra_heads[head_no]->current_pass_ptr != NULL))) {
|
||||
|
@ -1517,12 +1520,14 @@ void hydra_increase_fail_count(int32_t target_no, int32_t head_no) {
|
|||
hydra_heads[head_no]->current_login_ptr = empty_login;
|
||||
hydra_heads[head_no]->current_pass_ptr = empty_login;
|
||||
}
|
||||
/*
|
||||
hydra_targets[target_no]->fail_count--;
|
||||
if (k < 5 && hydra_targets[target_no]->ok)
|
||||
hydra_targets[target_no]->fail_count--;
|
||||
if (k == 2 && hydra_targets[target_no]->ok)
|
||||
hydra_targets[target_no]->fail_count--;
|
||||
if (hydra_brains.targets > hydra_brains.finished)
|
||||
*/
|
||||
if (hydra_brains.targets <= hydra_brains.finished)
|
||||
hydra_kill_head(head_no, 1, 0);
|
||||
else {
|
||||
hydra_kill_head(head_no, 1, 2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue