mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-07-05 20:41:39 -07:00
sleep -> usleep fix
This commit is contained in:
parent
cbe0ada4c1
commit
f42f7626ac
30 changed files with 40 additions and 40 deletions
|
@ -74,7 +74,7 @@ void service_asterisk(char *ip, int sp, unsigned char options, char *miscptr, FI
|
||||||
case 1: /* connect and service init function */
|
case 1: /* connect and service init function */
|
||||||
if (sock >= 0)
|
if (sock >= 0)
|
||||||
sock = hydra_disconnect(sock);
|
sock = hydra_disconnect(sock);
|
||||||
// sleepn(300);
|
// usleepn(300);
|
||||||
if ((options & OPTION_SSL) == 0) {
|
if ((options & OPTION_SSL) == 0) {
|
||||||
if (port != 0)
|
if (port != 0)
|
||||||
myport = port;
|
myport = port;
|
||||||
|
|
|
@ -74,7 +74,7 @@ void service_cisco_enable(char *ip, int sp, unsigned char options, char *miscptr
|
||||||
{
|
{
|
||||||
if (sock >= 0)
|
if (sock >= 0)
|
||||||
sock = hydra_disconnect(sock);
|
sock = hydra_disconnect(sock);
|
||||||
// sleepn(275);
|
// usleepn(275);
|
||||||
if ((options & OPTION_SSL) == 0) {
|
if ((options & OPTION_SSL) == 0) {
|
||||||
if (port != 0)
|
if (port != 0)
|
||||||
myport = port;
|
myport = port;
|
||||||
|
|
|
@ -132,7 +132,7 @@ void service_cisco(char *ip, int sp, unsigned char options, char *miscptr, FILE
|
||||||
|
|
||||||
if (sock >= 0)
|
if (sock >= 0)
|
||||||
sock = hydra_disconnect(sock);
|
sock = hydra_disconnect(sock);
|
||||||
// sleepn(275);
|
// usleepn(275);
|
||||||
if ((options & OPTION_SSL) == 0) {
|
if ((options & OPTION_SSL) == 0) {
|
||||||
if (port != 0)
|
if (port != 0)
|
||||||
myport = port;
|
myport = port;
|
||||||
|
|
|
@ -104,7 +104,7 @@ void service_cvs(char *ip, int sp, unsigned char options, char *miscptr, FILE *
|
||||||
if (sock >= 0)
|
if (sock >= 0)
|
||||||
sock = hydra_disconnect(sock);
|
sock = hydra_disconnect(sock);
|
||||||
|
|
||||||
// sleepn(300);
|
// usleepn(300);
|
||||||
if ((options & OPTION_SSL) == 0) {
|
if ((options & OPTION_SSL) == 0) {
|
||||||
if (port != 0)
|
if (port != 0)
|
||||||
myport = port;
|
myport = port;
|
||||||
|
|
|
@ -84,7 +84,7 @@ void service_ftp_core(char *ip, int sp, unsigned char options, char *miscptr, FI
|
||||||
case 1: /* connect and service init function */
|
case 1: /* connect and service init function */
|
||||||
if (sock >= 0)
|
if (sock >= 0)
|
||||||
sock = hydra_disconnect(sock);
|
sock = hydra_disconnect(sock);
|
||||||
// sleepn(300);
|
// usleepn(300);
|
||||||
if ((options & OPTION_SSL) == 0) {
|
if ((options & OPTION_SSL) == 0) {
|
||||||
if (port != 0)
|
if (port != 0)
|
||||||
myport = port;
|
myport = port;
|
||||||
|
|
|
@ -243,7 +243,7 @@ void service_http_proxy_urlenum(char *ip, int sp, unsigned char options, char *m
|
||||||
{
|
{
|
||||||
if (sock >= 0)
|
if (sock >= 0)
|
||||||
sock = hydra_disconnect(sock);
|
sock = hydra_disconnect(sock);
|
||||||
// sleepn(275);
|
// usleepn(275);
|
||||||
if ((options & OPTION_SSL) == 0) {
|
if ((options & OPTION_SSL) == 0) {
|
||||||
if (port != 0)
|
if (port != 0)
|
||||||
myport = port;
|
myport = port;
|
||||||
|
|
|
@ -263,7 +263,7 @@ void service_http_proxy(char *ip, int sp, unsigned char options, char *miscptr,
|
||||||
free(http_proxy_buf);
|
free(http_proxy_buf);
|
||||||
if (sock >= 0)
|
if (sock >= 0)
|
||||||
sock = hydra_disconnect(sock);
|
sock = hydra_disconnect(sock);
|
||||||
// sleepn(275);
|
// usleepn(275);
|
||||||
if ((options & OPTION_SSL) == 0) {
|
if ((options & OPTION_SSL) == 0) {
|
||||||
if (port != 0)
|
if (port != 0)
|
||||||
myport = port;
|
myport = port;
|
||||||
|
|
|
@ -19,7 +19,7 @@ char *imap_read_server_capacity(int sock) {
|
||||||
if (buf != NULL) {
|
if (buf != NULL) {
|
||||||
if (strstr(buf, "CAPABILITY") != NULL && buf[0] == '*') {
|
if (strstr(buf, "CAPABILITY") != NULL && buf[0] == '*') {
|
||||||
resp = 1;
|
resp = 1;
|
||||||
sleepn(300);
|
usleepn(300);
|
||||||
/* we got the capability info then get the completed warning info from server */
|
/* we got the capability info then get the completed warning info from server */
|
||||||
while (hydra_data_ready(sock)) {
|
while (hydra_data_ready(sock)) {
|
||||||
free(buf);
|
free(buf);
|
||||||
|
@ -366,7 +366,7 @@ void service_imap(char *ip, int sp, unsigned char options, char *miscptr, FILE *
|
||||||
case 1: /* connect and service init function */
|
case 1: /* connect and service init function */
|
||||||
if (sock >= 0)
|
if (sock >= 0)
|
||||||
sock = hydra_disconnect(sock);
|
sock = hydra_disconnect(sock);
|
||||||
// sleepn(275);
|
// usleepn(275);
|
||||||
if ((options & OPTION_SSL) == 0) {
|
if ((options & OPTION_SSL) == 0) {
|
||||||
if (port != 0)
|
if (port != 0)
|
||||||
myport = port;
|
myport = port;
|
||||||
|
|
|
@ -63,7 +63,7 @@ int send_nick(int s, char *ip, char *pass) {
|
||||||
int irc_server_connect(char *ip, int sock, int port, unsigned char options, char *hostname) {
|
int irc_server_connect(char *ip, int sock, int port, unsigned char options, char *hostname) {
|
||||||
if (sock >= 0)
|
if (sock >= 0)
|
||||||
sock = hydra_disconnect(sock);
|
sock = hydra_disconnect(sock);
|
||||||
// sleepn(275);
|
// usleepn(275);
|
||||||
if ((options & OPTION_SSL) == 0) {
|
if ((options & OPTION_SSL) == 0) {
|
||||||
if (port != 0)
|
if (port != 0)
|
||||||
myport = port;
|
myport = port;
|
||||||
|
|
|
@ -363,7 +363,7 @@ void service_ldap(char *ip, int sp, unsigned char options, char *miscptr, FILE *
|
||||||
case 1: /* connect and service init function */
|
case 1: /* connect and service init function */
|
||||||
if (sock >= 0)
|
if (sock >= 0)
|
||||||
sock = hydra_disconnect(sock);
|
sock = hydra_disconnect(sock);
|
||||||
// sleepn(275);
|
// usleepn(275);
|
||||||
if ((options & OPTION_SSL) == 0) {
|
if ((options & OPTION_SSL) == 0) {
|
||||||
if (port != 0)
|
if (port != 0)
|
||||||
myport = port;
|
myport = port;
|
||||||
|
|
|
@ -603,7 +603,7 @@ void hydra_child_exit(int code) {
|
||||||
__fck = write(intern_socket, "E", 1);
|
__fck = write(intern_socket, "E", 1);
|
||||||
}
|
}
|
||||||
do {
|
do {
|
||||||
sleepn(10);
|
usleepn(10);
|
||||||
} while (read(intern_socket, buf, 1) <= 0);
|
} while (read(intern_socket, buf, 1) <= 0);
|
||||||
close(intern_socket);
|
close(intern_socket);
|
||||||
// sleep(2); // be sure that mommy receives our message
|
// sleep(2); // be sure that mommy receives our message
|
||||||
|
|
|
@ -322,7 +322,7 @@ void service_mysql(char *ip, int sp, unsigned char options, char *miscptr, FILE
|
||||||
hydra_mysql_send_com_quit(sock);
|
hydra_mysql_send_com_quit(sock);
|
||||||
sock = hydra_disconnect(sock);
|
sock = hydra_disconnect(sock);
|
||||||
}
|
}
|
||||||
// sleepn(300);
|
// usleepn(300);
|
||||||
if ((options & OPTION_SSL) == 0) {
|
if ((options & OPTION_SSL) == 0) {
|
||||||
if (port != 0)
|
if (port != 0)
|
||||||
myport = port;
|
myport = port;
|
||||||
|
|
|
@ -279,7 +279,7 @@ void service_nntp(char *ip, int sp, unsigned char options, char *miscptr, FILE *
|
||||||
case 1: /* connect and service init function */
|
case 1: /* connect and service init function */
|
||||||
if (sock >= 0)
|
if (sock >= 0)
|
||||||
sock = hydra_disconnect(sock);
|
sock = hydra_disconnect(sock);
|
||||||
// sleepn(300);
|
// usleepn(300);
|
||||||
if ((options & OPTION_SSL) == 0) {
|
if ((options & OPTION_SSL) == 0) {
|
||||||
if (port != 0)
|
if (port != 0)
|
||||||
myport = port;
|
myport = port;
|
||||||
|
@ -296,7 +296,7 @@ void service_nntp(char *ip, int sp, unsigned char options, char *miscptr, FILE *
|
||||||
hydra_report(stderr, "[ERROR] Child with pid %d terminating, can not connect\n", (int) getpid());
|
hydra_report(stderr, "[ERROR] Child with pid %d terminating, can not connect\n", (int) getpid());
|
||||||
hydra_child_exit(1);
|
hydra_child_exit(1);
|
||||||
}
|
}
|
||||||
// sleepn(300);
|
// usleepn(300);
|
||||||
buf = hydra_receive_line(sock);
|
buf = hydra_receive_line(sock);
|
||||||
if (buf == NULL || buf[0] != '2') { /* check the first line */
|
if (buf == NULL || buf[0] != '2') { /* check the first line */
|
||||||
if (verbose || debug)
|
if (verbose || debug)
|
||||||
|
@ -452,7 +452,7 @@ SASL PLAIN DIGEST-MD5 LOGIN NTLM CRAM-MD5
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sleepn(25);
|
usleepn(25);
|
||||||
free(buf);
|
free(buf);
|
||||||
next_run = 2;
|
next_run = 2;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -287,7 +287,7 @@ void service_oracle_listener(char *ip, int sp, unsigned char options, char *misc
|
||||||
case 1: /* connect and service init function */
|
case 1: /* connect and service init function */
|
||||||
if (sock >= 0)
|
if (sock >= 0)
|
||||||
sock = hydra_disconnect(sock);
|
sock = hydra_disconnect(sock);
|
||||||
// sleepn(300);
|
// usleepn(300);
|
||||||
if ((options & OPTION_SSL) == 0) {
|
if ((options & OPTION_SSL) == 0) {
|
||||||
if (port != 0)
|
if (port != 0)
|
||||||
myport = port;
|
myport = port;
|
||||||
|
|
|
@ -97,7 +97,7 @@ void service_oracle_sid(char *ip, int sp, unsigned char options, char *miscptr,
|
||||||
case 1: /* connect and service init function */
|
case 1: /* connect and service init function */
|
||||||
if (sock >= 0)
|
if (sock >= 0)
|
||||||
sock = hydra_disconnect(sock);
|
sock = hydra_disconnect(sock);
|
||||||
// sleepn(300);
|
// usleepn(300);
|
||||||
if ((options & OPTION_SSL) == 0) {
|
if ((options & OPTION_SSL) == 0) {
|
||||||
if (port != 0)
|
if (port != 0)
|
||||||
myport = port;
|
myport = port;
|
||||||
|
|
|
@ -238,7 +238,7 @@ void service_pcanywhere(char *ip, int sp, unsigned char options, char *miscptr,
|
||||||
case 1: /* connect and service init function */
|
case 1: /* connect and service init function */
|
||||||
if (sock >= 0)
|
if (sock >= 0)
|
||||||
sock = hydra_disconnect(sock);
|
sock = hydra_disconnect(sock);
|
||||||
sleepn(275);
|
usleepn(275);
|
||||||
if ((options & OPTION_SSL) == 0) {
|
if ((options & OPTION_SSL) == 0) {
|
||||||
if (port != 0)
|
if (port != 0)
|
||||||
myport = port;
|
myport = port;
|
||||||
|
|
|
@ -159,7 +159,7 @@ void service_pcnfs(char *ip, int sp, unsigned char options, char *miscptr, FILE
|
||||||
{
|
{
|
||||||
if (sock >= 0)
|
if (sock >= 0)
|
||||||
sock = hydra_disconnect(sock);
|
sock = hydra_disconnect(sock);
|
||||||
// sleepn(275);
|
// usleepn(275);
|
||||||
if ((sock = hydra_connect_udp(ip, port)) < 0) {
|
if ((sock = hydra_connect_udp(ip, port)) < 0) {
|
||||||
if (quiet != 1) fprintf(stderr, "[ERROR] Child with pid %d terminating, can not connect\n", (int) getpid());
|
if (quiet != 1) fprintf(stderr, "[ERROR] Child with pid %d terminating, can not connect\n", (int) getpid());
|
||||||
hydra_child_exit(1);
|
hydra_child_exit(1);
|
||||||
|
|
|
@ -438,7 +438,7 @@ void service_pop3(char *ip, int sp, unsigned char options, char *miscptr, FILE *
|
||||||
|
|
||||||
if (sock >= 0)
|
if (sock >= 0)
|
||||||
sock = hydra_disconnect(sock);
|
sock = hydra_disconnect(sock);
|
||||||
// sleepn(300);
|
// usleepn(300);
|
||||||
if ((options & OPTION_SSL) == 0) {
|
if ((options & OPTION_SSL) == 0) {
|
||||||
sock = hydra_connect_tcp(ip, port);
|
sock = hydra_connect_tcp(ip, port);
|
||||||
} else {
|
} else {
|
||||||
|
@ -525,7 +525,7 @@ int service_pop3_init(char *ip, int sp, unsigned char options, char *miscptr, FI
|
||||||
|
|
||||||
if (sock >= 0)
|
if (sock >= 0)
|
||||||
sock = hydra_disconnect(sock);
|
sock = hydra_disconnect(sock);
|
||||||
// sleepn(300);
|
// usleepn(300);
|
||||||
if ((options & OPTION_SSL) == 0) {
|
if ((options & OPTION_SSL) == 0) {
|
||||||
if (port != 0)
|
if (port != 0)
|
||||||
myport = port;
|
myport = port;
|
||||||
|
|
|
@ -80,7 +80,7 @@ void service_postgres(char *ip, int sp, unsigned char options, char *miscptr, FI
|
||||||
case 1: /* connect and service init function */
|
case 1: /* connect and service init function */
|
||||||
if (sock >= 0)
|
if (sock >= 0)
|
||||||
sock = hydra_disconnect(sock);
|
sock = hydra_disconnect(sock);
|
||||||
// sleepn(275);
|
// usleepn(275);
|
||||||
if ((options & OPTION_SSL) == 0) {
|
if ((options & OPTION_SSL) == 0) {
|
||||||
if (port != 0)
|
if (port != 0)
|
||||||
myport = port;
|
myport = port;
|
||||||
|
|
|
@ -59,7 +59,7 @@ void service_rexec(char *ip, int sp, unsigned char options, char *miscptr, FILE
|
||||||
{
|
{
|
||||||
if (sock >= 0)
|
if (sock >= 0)
|
||||||
sock = hydra_disconnect(sock);
|
sock = hydra_disconnect(sock);
|
||||||
// sleepn(275);
|
// usleepn(275);
|
||||||
if ((options & OPTION_SSL) == 0) {
|
if ((options & OPTION_SSL) == 0) {
|
||||||
if (port != 0)
|
if (port != 0)
|
||||||
myport = port;
|
myport = port;
|
||||||
|
|
|
@ -106,7 +106,7 @@ void service_rlogin(char *ip, int sp, unsigned char options, char *miscptr, FILE
|
||||||
hydra_set_srcport(1023);
|
hydra_set_srcport(1023);
|
||||||
if (sock >= 0)
|
if (sock >= 0)
|
||||||
sock = hydra_disconnect(sock);
|
sock = hydra_disconnect(sock);
|
||||||
// sleepn(275);
|
// usleepn(275);
|
||||||
if ((options & OPTION_SSL) == 0) {
|
if ((options & OPTION_SSL) == 0) {
|
||||||
if (port != 0)
|
if (port != 0)
|
||||||
myport = port;
|
myport = port;
|
||||||
|
|
|
@ -76,7 +76,7 @@ void service_rsh(char *ip, int sp, unsigned char options, char *miscptr, FILE *
|
||||||
hydra_set_srcport(1023);
|
hydra_set_srcport(1023);
|
||||||
if (sock >= 0)
|
if (sock >= 0)
|
||||||
sock = hydra_disconnect(sock);
|
sock = hydra_disconnect(sock);
|
||||||
// sleepn(275);
|
// usleepn(275);
|
||||||
if ((options & OPTION_SSL) == 0) {
|
if ((options & OPTION_SSL) == 0) {
|
||||||
if (port != 0)
|
if (port != 0)
|
||||||
myport = port;
|
myport = port;
|
||||||
|
|
|
@ -1375,7 +1375,7 @@ void service_smb(char *ip, int sp, unsigned char options, char *miscptr, FILE *
|
||||||
case 1: /* connect and service init function */
|
case 1: /* connect and service init function */
|
||||||
if (sock >= 0)
|
if (sock >= 0)
|
||||||
sock = hydra_disconnect(sock);
|
sock = hydra_disconnect(sock);
|
||||||
// sleepn(300);
|
// usleepn(300);
|
||||||
|
|
||||||
if (port != 0) {
|
if (port != 0) {
|
||||||
sock = hydra_connect_tcp(ip, port);
|
sock = hydra_connect_tcp(ip, port);
|
||||||
|
|
|
@ -119,7 +119,7 @@ void service_socks5(char *ip, int sp, unsigned char options, char *miscptr, FILE
|
||||||
case 1: /* connect and service init function */
|
case 1: /* connect and service init function */
|
||||||
if (sock >= 0)
|
if (sock >= 0)
|
||||||
sock = hydra_disconnect(sock);
|
sock = hydra_disconnect(sock);
|
||||||
// sleepn(300);
|
// usleepn(300);
|
||||||
if ((options & OPTION_SSL) == 0) {
|
if ((options & OPTION_SSL) == 0) {
|
||||||
if (port != 0)
|
if (port != 0)
|
||||||
myport = port;
|
myport = port;
|
||||||
|
|
|
@ -152,7 +152,7 @@ void service_svn(char *ip, int sp, unsigned char options, char *miscptr, FILE *
|
||||||
if (sock >= 0)
|
if (sock >= 0)
|
||||||
sock = hydra_disconnect(sock);
|
sock = hydra_disconnect(sock);
|
||||||
|
|
||||||
// sleepn(300);
|
// usleepn(300);
|
||||||
if ((options & OPTION_SSL) == 0) {
|
if ((options & OPTION_SSL) == 0) {
|
||||||
if (port != 0)
|
if (port != 0)
|
||||||
myport = port;
|
myport = port;
|
||||||
|
|
|
@ -116,7 +116,7 @@ void service_teamspeak(char *ip, int sp, unsigned char options, char *miscptr, F
|
||||||
case 1: /* connect and service init function */
|
case 1: /* connect and service init function */
|
||||||
// if (sock >= 0)
|
// if (sock >= 0)
|
||||||
// sock = hydra_disconnect(sock);
|
// sock = hydra_disconnect(sock);
|
||||||
// sleepn(300);
|
// usleepn(300);
|
||||||
if (sock < 0) {
|
if (sock < 0) {
|
||||||
if (port != 0)
|
if (port != 0)
|
||||||
myport = port;
|
myport = port;
|
||||||
|
|
|
@ -24,7 +24,7 @@ int start_telnet(int s, char *ip, int port, unsigned char options, char *miscptr
|
||||||
} else {
|
} else {
|
||||||
send(s, &buffer[i], 1, 0);
|
send(s, &buffer[i], 1, 0);
|
||||||
}
|
}
|
||||||
sleepn(20);
|
usleepn(20);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (hydra_send(s, buffer, strlen(buffer) + 1, 0) < 0) {
|
if (hydra_send(s, buffer, strlen(buffer) + 1, 0) < 0) {
|
||||||
|
@ -66,7 +66,7 @@ int start_telnet(int s, char *ip, int port, unsigned char options, char *miscptr
|
||||||
} else {
|
} else {
|
||||||
send(s, &buffer[i], 1, 0);
|
send(s, &buffer[i], 1, 0);
|
||||||
}
|
}
|
||||||
sleepn(20);
|
usleepn(20);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (hydra_send(s, buffer, strlen(buffer) + 1, 0) < 0) {
|
if (hydra_send(s, buffer, strlen(buffer) + 1, 0) < 0) {
|
||||||
|
@ -112,7 +112,7 @@ void service_telnet(char *ip, int sp, unsigned char options, char *miscptr, FILE
|
||||||
case 1: /* connect and service init function */
|
case 1: /* connect and service init function */
|
||||||
if (sock >= 0)
|
if (sock >= 0)
|
||||||
sock = hydra_disconnect(sock);
|
sock = hydra_disconnect(sock);
|
||||||
// sleepn(300);
|
// usleepn(300);
|
||||||
no_line_mode = 0;
|
no_line_mode = 0;
|
||||||
first = 0;
|
first = 0;
|
||||||
if ((options & OPTION_SSL) == 0) {
|
if ((options & OPTION_SSL) == 0) {
|
||||||
|
|
|
@ -77,7 +77,7 @@ void service_vmauthd(char *ip, int sp, unsigned char options, char *miscptr, FIL
|
||||||
case 1: /* connect and service init function */
|
case 1: /* connect and service init function */
|
||||||
if (sock >= 0)
|
if (sock >= 0)
|
||||||
sock = hydra_disconnect(sock);
|
sock = hydra_disconnect(sock);
|
||||||
// sleepn(300);
|
// usleepn(300);
|
||||||
if ((options & OPTION_SSL) == 0) {
|
if ((options & OPTION_SSL) == 0) {
|
||||||
if (port != 0)
|
if (port != 0)
|
||||||
myport = port;
|
myport = port;
|
||||||
|
|
|
@ -170,7 +170,7 @@ void service_vnc(char *ip, int sp, unsigned char options, char *miscptr, FILE *
|
||||||
hydra_report(stderr, "[ERROR] Child with pid %d terminating, can not connect\n", (int) getpid());
|
hydra_report(stderr, "[ERROR] Child with pid %d terminating, can not connect\n", (int) getpid());
|
||||||
hydra_child_exit(1);
|
hydra_child_exit(1);
|
||||||
}
|
}
|
||||||
sleepn(300);
|
usleepn(300);
|
||||||
buf = hydra_receive_line(sock);
|
buf = hydra_receive_line(sock);
|
||||||
|
|
||||||
if (buf == NULL || (strncmp(buf, "RFB", 3) != 0)) { /* check the first line */
|
if (buf == NULL || (strncmp(buf, "RFB", 3) != 0)) { /* check the first line */
|
||||||
|
|
10
hydra-xmpp.c
10
hydra-xmpp.c
|
@ -47,7 +47,7 @@ int start_xmpp(int s, char *ip, int port, unsigned char options, char *miscptr,
|
||||||
}
|
}
|
||||||
|
|
||||||
hydra_send(s, buffer, strlen(buffer), 0);
|
hydra_send(s, buffer, strlen(buffer), 0);
|
||||||
sleepn(300);
|
usleepn(300);
|
||||||
if ((buf = hydra_receive_line(s)) == NULL)
|
if ((buf = hydra_receive_line(s)) == NULL)
|
||||||
return 3;
|
return 3;
|
||||||
|
|
||||||
|
@ -244,7 +244,7 @@ int start_xmpp(int s, char *ip, int port, unsigned char options, char *miscptr,
|
||||||
if (hydra_send(s, buffer, strlen(buffer), 0) < 0) {
|
if (hydra_send(s, buffer, strlen(buffer), 0) < 0) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
sleepn(50);
|
usleepn(50);
|
||||||
buf = hydra_receive_line(s);
|
buf = hydra_receive_line(s);
|
||||||
if (buf == NULL)
|
if (buf == NULL)
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -334,7 +334,7 @@ void service_xmpp(char *target, char *ip, int sp, unsigned char options, char *m
|
||||||
hydra_child_exit(1);
|
hydra_child_exit(1);
|
||||||
}
|
}
|
||||||
//some server is longer to answer
|
//some server is longer to answer
|
||||||
sleepn(300);
|
usleepn(300);
|
||||||
do {
|
do {
|
||||||
if ((buf = hydra_receive_line(sock)) == NULL) {
|
if ((buf = hydra_receive_line(sock)) == NULL) {
|
||||||
/* no auth method identified */
|
/* no auth method identified */
|
||||||
|
@ -435,7 +435,7 @@ void service_xmpp(char *target, char *ip, int sp, unsigned char options, char *m
|
||||||
char *STARTTLS = "<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>";
|
char *STARTTLS = "<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>";
|
||||||
|
|
||||||
hydra_send(sock, STARTTLS, strlen(STARTTLS), 0);
|
hydra_send(sock, STARTTLS, strlen(STARTTLS), 0);
|
||||||
sleepn(300);
|
usleepn(300);
|
||||||
buf = hydra_receive_line(sock);
|
buf = hydra_receive_line(sock);
|
||||||
|
|
||||||
if (buf == NULL || strstr(buf, "<failure") != NULL) {
|
if (buf == NULL || strstr(buf, "<failure") != NULL) {
|
||||||
|
@ -460,7 +460,7 @@ void service_xmpp(char *target, char *ip, int sp, unsigned char options, char *m
|
||||||
hydra_child_exit(1);
|
hydra_child_exit(1);
|
||||||
}
|
}
|
||||||
//some server is longer to answer
|
//some server is longer to answer
|
||||||
sleepn(300);
|
usleepn(300);
|
||||||
buf = hydra_receive_line(sock);
|
buf = hydra_receive_line(sock);
|
||||||
if ((buf == NULL) || (strstr(buf, "<stream:stream") == NULL))
|
if ((buf == NULL) || (strstr(buf, "<stream:stream") == NULL))
|
||||||
hydra_child_exit(1);
|
hydra_child_exit(1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue