mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-08-19 21:03:52 -07:00
added -K no redo switch
This commit is contained in:
parent
c2286ffb00
commit
4cda4ca189
3 changed files with 9 additions and 1 deletions
1
CHANGES
1
CHANGES
|
@ -3,6 +3,7 @@ Changelog for hydra
|
||||||
|
|
||||||
Release 9.1-dev
|
Release 9.1-dev
|
||||||
* your patch? :)
|
* your patch? :)
|
||||||
|
* added -K command line switch to disable redo attempts (good for mass scanning)
|
||||||
* forgot to have the -m option in the hydra help output
|
* forgot to have the -m option in the hydra help output
|
||||||
|
|
||||||
|
|
||||||
|
|
8
hydra.c
8
hydra.c
|
@ -508,6 +508,7 @@ void help(int32_t ext) {
|
||||||
" -4 / -6 use IPv4 (default) / IPv6 addresses (put always in [] also in -M)\n"
|
" -4 / -6 use IPv4 (default) / IPv6 addresses (put always in [] also in -M)\n"
|
||||||
" -v / -V / -d verbose mode / show login+pass for each attempt / debug mode \n"
|
" -v / -V / -d verbose mode / show login+pass for each attempt / debug mode \n"
|
||||||
" -O use old SSL v2 and v3\n"
|
" -O use old SSL v2 and v3\n"
|
||||||
|
" -K do not redo failed attempts (good for -M mass scanning)\n"
|
||||||
" -q do not print messages about connection errors\n",
|
" -q do not print messages about connection errors\n",
|
||||||
MAXTASKS, WAITTIME, conwait
|
MAXTASKS, WAITTIME, conwait
|
||||||
);
|
);
|
||||||
|
@ -1397,6 +1398,7 @@ void hydra_increase_fail_count(int32_t target_no, int32_t head_no) {
|
||||||
if (k <= 1) {
|
if (k <= 1) {
|
||||||
// we need to put this in a list, otherwise we fail one login+pw test
|
// we need to put this in a list, otherwise we fail one login+pw test
|
||||||
if (hydra_targets[target_no]->done == TARGET_ACTIVE
|
if (hydra_targets[target_no]->done == TARGET_ACTIVE
|
||||||
|
&& hydra_options.skip_redo == 0
|
||||||
&& hydra_targets[target_no]->redo <= hydra_options.max_use * 2
|
&& 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 != 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))) {
|
|| (hydra_heads[head_no]->current_login_ptr != NULL && hydra_heads[head_no]->current_pass_ptr != NULL))) {
|
||||||
|
@ -1429,6 +1431,7 @@ void hydra_increase_fail_count(int32_t target_no, int32_t head_no) {
|
||||||
} else {
|
} else {
|
||||||
// we need to put this in a list, otherwise we fail one login+pw test
|
// we need to put this in a list, otherwise we fail one login+pw test
|
||||||
if (hydra_targets[target_no]->done == TARGET_ACTIVE
|
if (hydra_targets[target_no]->done == TARGET_ACTIVE
|
||||||
|
&& hydra_options.skip_redo == 0
|
||||||
&& hydra_targets[target_no]->redo <= hydra_options.max_use * 2
|
&& 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 != 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))) {
|
|| (hydra_heads[head_no]->current_login_ptr != NULL && hydra_heads[head_no]->current_pass_ptr != NULL))) {
|
||||||
|
@ -2220,7 +2223,7 @@ int main(int argc, char *argv[]) {
|
||||||
help(1);
|
help(1);
|
||||||
if (argc < 2)
|
if (argc < 2)
|
||||||
help(0);
|
help(0);
|
||||||
while ((i = getopt(argc, argv, "hIq64Rde:vVl:fFg:L:p:OP:o:b:M:C:t:T:m:w:W:s:SUux:yc:")) >= 0) {
|
while ((i = getopt(argc, argv, "hIq64Rde:vVl:fFg:L:p:OP:o:b:M:C:t:T:m:w:W:s:SUux:yc:K")) >= 0) {
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 'h':
|
case 'h':
|
||||||
help(1);
|
help(1);
|
||||||
|
@ -2228,6 +2231,9 @@ int main(int argc, char *argv[]) {
|
||||||
case 'q':
|
case 'q':
|
||||||
quiet = 1;
|
quiet = 1;
|
||||||
break;
|
break;
|
||||||
|
case 'K':
|
||||||
|
hydra_options.skip_redo = 1;
|
||||||
|
break;
|
||||||
case 'O':
|
case 'O':
|
||||||
old_ssl = 1;
|
old_ssl = 1;
|
||||||
break;
|
break;
|
||||||
|
|
1
hydra.h
1
hydra.h
|
@ -213,6 +213,7 @@ typedef struct {
|
||||||
char *server;
|
char *server;
|
||||||
char *service;
|
char *service;
|
||||||
char bfg;
|
char bfg;
|
||||||
|
int32_t skip_redo;
|
||||||
} hydra_option;
|
} hydra_option;
|
||||||
|
|
||||||
#define _HYDRA_H
|
#define _HYDRA_H
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue