mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-08-21 13:53:59 -07:00
cleanup
This commit is contained in:
parent
185021d474
commit
1a72fe023e
18 changed files with 60 additions and 66 deletions
10
hydra-rsh.c
10
hydra-rsh.c
|
@ -37,13 +37,11 @@ int32_t start_rsh(int32_t s, char *ip, int32_t port, unsigned char options, char
|
|||
}
|
||||
|
||||
buffer[0] = 0;
|
||||
if ((ret = hydra_recv(s, buffer, sizeof(buffer) - 1)) >= 0)
|
||||
if ((ret = hydra_recv(s, buffer, sizeof(buffer) - 1)) > 0)
|
||||
buffer[ret] = 0;
|
||||
/* 0x00 is sent but hydra_recv transformed it */
|
||||
if (strlen(buffer) == 0)
|
||||
ret = hydra_recv(s, buffer, sizeof(buffer) - 1);
|
||||
if (ret >= 0)
|
||||
buffer[ret] = 0;
|
||||
else /* 0x00 is sent but hydra_recv transformed it */
|
||||
if ((ret = hydra_recv(s, buffer, sizeof(buffer) - 1)) > 0)
|
||||
buffer[ret] = 0;
|
||||
#ifdef HAVE_PCRE
|
||||
if (ret > 0 && (!hydra_string_match(buffer, "\\s(failure|incorrect|denied)"))) {
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue