it look like github wants to drive me mad

This commit is contained in:
owein 2019-10-07 14:20:02 +02:00
commit 1658f4926f
4 changed files with 40 additions and 7 deletions

11
hydra.c
View file

@ -337,6 +337,7 @@ char *sck = NULL;
int32_t prefer_ipv6 = 0, conwait = 0, loop_cnt = 0, fck = 0, options = 0, killed = 0;
int32_t child_head_no = -1, child_socket;
int32_t total_redo_count = 0;
bool rainy = false;
// moved for restore feature
int32_t process_restore = 0, dont_unlink;
@ -482,6 +483,7 @@ void help(int32_t ext) {
"[service://server[:PORT][/OPT]]\n");
PRINT_NORMAL(ext, "\nOptions:\n");
PRINT_EXTEND(ext, " -R restore a previous aborted/crashed session\n"
" -r in conjonction with -x, use rain algorythm\n"
" -I ignore an existing restore file (don't wait 10 seconds)\n"
#ifdef LIBOPENSSL
" -S perform an SSL connect\n"
@ -1745,7 +1747,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_targets[target_no]->pass_ptr = bf_next(hydra_options.rainy);
if (debug)
printf("[DEBUG] bfg new password for next child: %s\n", hydra_targets[target_no]->pass_ptr);
#endif
@ -2229,7 +2231,7 @@ int main(int argc, char *argv[]) {
help(1);
if (argc < 2)
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:K")) >= 0) {
while ((i = getopt(argc, argv, "hIq64Rrde:vVl:fFg:L:p:OP:o:b:M:C:t:T:m:w:W:s:SUux:yc:K")) >= 0) {
switch (i) {
case 'h':
help(1);
@ -2256,6 +2258,9 @@ int main(int argc, char *argv[]) {
hydra_options.restore = 1;
hydra_restore_read();
break;
case 'r':
hydra_options.rainy = true;
break;
case 'I':
ignore_restore = 1; // this is not to be saved in hydra_options!
break;
@ -3267,7 +3272,7 @@ int main(int argc, char *argv[]) {
#ifdef HAVE_MATH_H
if (bf_init(bf_options.arg))
exit(-1); // error description is handled by bf_init
pass_ptr = bf_next();
pass_ptr = bf_next(hydra_options.rainy);
hydra_brains.countpass += bf_get_pcount();
hydra_brains.sizepass += BF_BUFLEN;
#else