Merge pull request #228 from Diadlo/useless_check

Useless check
This commit is contained in:
van Hauser 2017-06-11 18:39:21 +02:00 committed by GitHub
commit b391d725cd
5 changed files with 2 additions and 9 deletions

View file

@ -525,9 +525,6 @@ int service_pop3_init(char *ip, int sp, unsigned char options, char *miscptr, FI
p.disable_tls = 1;
memcpy(p.ip, ip, 36);
if (sock >= 0)
sock = hydra_disconnect(sock);
// usleepn(300);
if ((options & OPTION_SSL) == 0) {
if (port != 0)
myport = port;

View file

@ -135,8 +135,6 @@ int service_redis_init(char *ip, int sp, unsigned char options, char *miscptr, F
char buffer[] = "*1\r\n$4\r\nping\r\n";
hydra_register_socket(sp);
if (sock >= 0)
sock = hydra_disconnect(sock);
if ((options & OPTION_SSL) == 0) {
if (port != 0)
myport = port;

View file

@ -130,8 +130,6 @@ int service_rpcap_init(char *ip, int sp, unsigned char options, char *miscptr, F
char buffer[] = "\x00\x08\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00";
hydra_register_socket(sp);
if (sock >= 0)
sock = hydra_disconnect(sock);
if ((options & OPTION_SSL) == 0) {
if (port != 0)
myport = port;

View file

@ -1944,7 +1944,7 @@ int hydra_send_next_pair(int target_no, int head_no) {
hydra_targets[target_no]->login_no = 0;
hydra_targets[target_no]->login_ptr = login_ptr;
} else if (hydra_targets[target_no]->login_no < hydra_brains.countlogin) {
} else {
hydra_targets[target_no]->login_ptr++;
while (*hydra_targets[target_no]->login_ptr != 0)
hydra_targets[target_no]->login_ptr++;

2
sasl.c
View file

@ -308,7 +308,7 @@ void sasl_digest_md5(char *result, char *login, char *pass, char *buffer, char *
currentpos = 0;
}
pbuffer++;
} while ((pbuffer[0] != '\0') && (pbuffer[0] > 31) && (ind < array_size));
} while ((pbuffer[0] > 31) && (ind < array_size));
//save the latest one
if (ind < array_size) {
array[ind] = malloc(currentpos + 1);