diff --git a/bfg.c b/bfg.c index 0d670dd..d9667e6 100644 --- a/bfg.c +++ b/bfg.c @@ -1,6 +1,5 @@ -/* code original by Jan Dlabal , partially rewritten by vh, - rainy tweaks by owein */ +/* code original by Jan Dlabal , partially rewritten by vh. */ #include #include @@ -174,8 +173,6 @@ int32_t bf_init(char *arg) { bf_options.crs_len = crs_len; bf_options.current = bf_options.from; - bf_options.rain = 0; - bf_options.gcounter = 0; memset((char *) bf_options.state, 0, sizeof(bf_options.state)); @@ -202,7 +199,7 @@ uint64_t bf_get_pcount() { return foo; } -char *bf_next(_Bool rainy) { +char *bf_next() { int32_t i, pos = bf_options.current - 1; if (bf_options.current > bf_options.to) @@ -213,18 +210,7 @@ char *bf_next(_Bool rainy) { return NULL; } - if(rainy) - { - bf_options.rain = bf_options.gcounter; - bf_options.ptr[0] = bf_options.crs[bf_options.state[0]]; - for(i=1; i= bf_options.crs_len) { - bf_options.state[pos] = 0; - pos++; - } - } - else while (pos >= 0 && (++bf_options.state[pos]) >= bf_options.crs_len) { bf_options.state[pos] = 0; pos--; @@ -252,7 +230,6 @@ char *bf_next(_Bool rainy) { if (pos < 0 || pos >= bf_options.current) { bf_options.current++; - bf_options.rain = 0; memset((char *)bf_options.state, 0, sizeof(bf_options.state)); } diff --git a/bfg.h b/bfg.h index 602cee6..6d11aee 100644 --- a/bfg.h +++ b/bfg.h @@ -43,8 +43,6 @@ typedef struct { char *crs; /* internal representation of charset */ char *ptr; /* ptr to the last generated password */ uint32_t disable_symbols; - uint64_t rain; - uint64_t gcounter; } bf_option; extern bf_option bf_options; @@ -52,7 +50,7 @@ extern bf_option bf_options; #ifdef HAVE_MATH_H extern uint64_t bf_get_pcount(); extern int32_t bf_init(char *arg); -extern char *bf_next(_Bool rainy); +extern char *bf_next(); #endif #endif diff --git a/hydra.c b/hydra.c index 3695110..9e1268a 100644 --- a/hydra.c +++ b/hydra.c @@ -1780,7 +1780,7 @@ int32_t hydra_send_next_pair(int32_t target_no, int32_t head_no) { #ifndef HAVE_MATH_H sleep(1); #else - hydra_targets[target_no]->pass_ptr = bf_next(hydra_options.rainy); + hydra_targets[target_no]->pass_ptr = bf_next(); if (debug) printf("[DEBUG] bfg new password for next child: %s\n", hydra_targets[target_no]->pass_ptr); #endif @@ -2280,7 +2280,6 @@ int main(int argc, char *argv[]) { hydra_brains.ofp = stdout; hydra_brains.targets = 1; hydra_options.waittime = waittime = WAITTIME; - hydra_options.rainy = 0; bf_options.disable_symbols = 0; // command line processing @@ -2316,7 +2315,7 @@ int main(int argc, char *argv[]) { hydra_restore_read(); break; case 'r': - hydra_options.rainy = 1; + fprintf(stderr, "Warning: the option -r has been removed.\n"); break; case 'I': ignore_restore = 1; // this is not to be saved in hydra_options! @@ -3433,7 +3432,7 @@ int main(int argc, char *argv[]) { if (bf_init(bf_options.arg)) exit(-1); // error description is handled by bf_init - pass_ptr = bf_next(hydra_options.rainy); + pass_ptr = bf_next(); hydra_brains.countpass += bf_get_pcount(); hydra_brains.sizepass += BF_BUFLEN; #else diff --git a/hydra.h b/hydra.h index f0a0253..6698eaf 100644 --- a/hydra.h +++ b/hydra.h @@ -206,7 +206,6 @@ typedef struct { char *server; char *service; char bfg; - int8_t rainy; int32_t skip_redo; } hydra_option;