diff --git a/bfg.c b/bfg.c index 964ddf4..537c1c9 100644 --- a/bfg.c +++ b/bfg.c @@ -220,6 +220,13 @@ char *bf_next() { printf(", x: %s\n", bf_options.ptr); } + //we revert the ordering of the bruteforce to fix the first static character + if(rainy) + while (pos >= 0 && (++bf_options.state[bf_options.current-1-pos]) >= bf_options.crs_len) { + bf_options.state[bf_options.current-1-pos] = 0; + pos--; + } + else while (pos >= 0 && (++bf_options.state[pos]) >= bf_options.crs_len) { bf_options.state[pos] = 0; pos--; diff --git a/bfg.h b/bfg.h index 6d11aee..418b7d4 100644 --- a/bfg.h +++ b/bfg.h @@ -43,6 +43,10 @@ typedef struct { char *crs; /* internal representation of charset */ char *ptr; /* ptr to the last generated password */ uint32_t disable_symbols; +<<<<<<< HEAD +======= + uint64_t rotate; +>>>>>>> c65e3a2 (update efficient rain option) } bf_option; extern bf_option bf_options;