mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-08-20 13:23:57 -07:00
smb req signing check
This commit is contained in:
parent
15e534fbbf
commit
cea00533ea
2 changed files with 9 additions and 2 deletions
|
@ -1480,7 +1480,7 @@ int32_t service_smb_init(char *ip, int32_t sp, unsigned char options, char *misc
|
|||
ctime = time(NULL);
|
||||
do {
|
||||
usleepn(300);
|
||||
} while ((ready = hydra_data_ready(sock)) <= 0 && ctime + 5 < time(NULL));
|
||||
} while ((ready = hydra_data_ready(sock)) <= 0 && ctime + 5 <= time(NULL));
|
||||
|
||||
if (ready <= 0) {
|
||||
fprintf(stderr, "[ERROR] no reply from target smb://%s:%d/\n", hostname, port);
|
||||
|
@ -1491,12 +1491,19 @@ int32_t service_smb_init(char *ip, int32_t sp, unsigned char options, char *misc
|
|||
fprintf(stderr, "[ERROR] invalid reply from target smb://%s:%d/\n", hostname, port);
|
||||
return -1;
|
||||
}
|
||||
|
||||
close(sock);
|
||||
|
||||
if (buf[37] == buf[38] && buf[38] == 0xff) {
|
||||
fprintf(stderr, "[ERROR] target smb://%s:%d/ does not support SMBv1\n", hostname, port);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (buf[15] & 16 == 16) {
|
||||
fprintf(stderr, "[ERROR] target smb://%s:%d/ requires signing which we do not support\n", hostname, port);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue