From 095efa631f36cedb4b04671e54d920b5ac9cf985 Mon Sep 17 00:00:00 2001 From: van Hauser Date: Mon, 8 Feb 2016 08:20:22 +0100 Subject: [PATCH] temporary debug --- hydra.c | 2 ++ performance.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/hydra.c b/hydra.c index be84d03..5f05010 100644 --- a/hydra.c +++ b/hydra.c @@ -3677,6 +3677,8 @@ int main(int argc, char *argv[]) { // this is the big function which starts the attacking children, feeds login/password pairs, etc.! while (exit_condition == 0) { + memset(&fdreadheads, 0, sizeof(fdreadheads)); + max_fd = 0; FD_ZERO(&fdreadheads); for (head_no = 0, max_fd = 1; head_no < hydra_options.max_use; head_no++) { if (hydra_heads[head_no]->active > 0) { diff --git a/performance.h b/performance.h index 5f90014..d7a7727 100644 --- a/performance.h +++ b/performance.h @@ -18,7 +18,9 @@ int my_select(int fd, fd_set * fdread, fd_set * fdwrite, fd_set * fdex, long sec fde2 = fdex; stv.tv_sec = sec; stv.tv_usec = usec; + if (debug) printf("before select\n"); ret_val = select(fd, fdr2, fdw2, fde2, &stv); + if (debug) printf("after select\n"); /* XXX select() sometimes returns errno=EINTR (signal found) */ } while (ret_val == -1 && errno == EINTR);