mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-07-05 20:41:39 -07:00
fixes for multiple targets and especially CIDR mode
This commit is contained in:
parent
9cce09c20b
commit
a7040b7724
4 changed files with 71 additions and 72 deletions
12
hydra-mod.c
12
hydra-mod.c
|
@ -27,7 +27,7 @@
|
|||
|
||||
extern int conwait;
|
||||
char quiet;
|
||||
|
||||
int do_retry = 1;
|
||||
int module_auth_type = -1;
|
||||
int intern_socket, extern_socket;
|
||||
char pair[260];
|
||||
|
@ -208,10 +208,14 @@ int internal__hydra_connect(char *host, int port, int protocol, int type) {
|
|||
alarm(0);
|
||||
if (ret < 0 && alarm_went_off == 0) {
|
||||
fail++;
|
||||
if (verbose && fail <= MAX_CONNECT_RETRY)
|
||||
fprintf(stderr, "Process %d: Can not connect [unreachable], retrying (%d of %d retries)\n", (int) getpid(), fail, MAX_CONNECT_RETRY);
|
||||
if (verbose ) {
|
||||
if (do_retry && fail <= MAX_CONNECT_RETRY)
|
||||
fprintf(stderr, "Process %d: Can not connect [unreachable], retrying (%d of %d retries)\n", (int) getpid(), fail, MAX_CONNECT_RETRY);
|
||||
else
|
||||
fprintf(stderr, "Process %d: Can not connect [unreachable]\n", (int) getpid());
|
||||
}
|
||||
}
|
||||
} while (ret < 0 && fail <= MAX_CONNECT_RETRY);
|
||||
} while (ret < 0 && fail <= MAX_CONNECT_RETRY && do_retry);
|
||||
if (ret < 0 && fail > MAX_CONNECT_RETRY) {
|
||||
if (debug)
|
||||
printf("DEBUG_CONNECT_UNREACHABLE\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue