mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-08-20 05:13:51 -07:00
fix for weird sshd response
This commit is contained in:
parent
67354f92ce
commit
93d5da33a7
1 changed files with 6 additions and 0 deletions
|
@ -191,10 +191,16 @@ int32_t service_ssh_init(char *ip, int32_t sp, unsigned char options, char *misc
|
||||||
ssh_finalize();
|
ssh_finalize();
|
||||||
ssh_free(session);
|
ssh_free(session);
|
||||||
|
|
||||||
|
if (debug) printf("[DEBUG] SSH method check: %08x\n", method);
|
||||||
|
|
||||||
if ((method & SSH_AUTH_METHOD_INTERACTIVE) || (method & SSH_AUTH_METHOD_PASSWORD)) {
|
if ((method & SSH_AUTH_METHOD_INTERACTIVE) || (method & SSH_AUTH_METHOD_PASSWORD)) {
|
||||||
if (verbose || debug)
|
if (verbose || debug)
|
||||||
printf("[INFO] Successful, password authentication is supported by ssh://%s:%d\n", hydra_address2string_beautiful(ip), port);
|
printf("[INFO] Successful, password authentication is supported by ssh://%s:%d\n", hydra_address2string_beautiful(ip), port);
|
||||||
return 0;
|
return 0;
|
||||||
|
} else if (method == 0) {
|
||||||
|
if (verbose || debug)
|
||||||
|
fprintf(stderr, "[WARNING] invalid SSH method reply from ssh://%s:%d, continuing anyway ... (check for empty password!)\n", hydra_address2string_beautiful(ip), port);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stderr, "[ERROR] target ssh://%s:%d/ does not support password authentication.\n", hydra_address2string_beautiful(ip), port);
|
fprintf(stderr, "[ERROR] target ssh://%s:%d/ does not support password authentication.\n", hydra_address2string_beautiful(ip), port);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue