mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-07-05 20:41:39 -07:00
fix ssh for -M and ip/range
This commit is contained in:
parent
93283091d0
commit
0b1f3c5037
3 changed files with 9 additions and 3 deletions
3
CHANGES
3
CHANGES
|
@ -1,6 +1,9 @@
|
|||
Changelog for hydra
|
||||
-------------------
|
||||
|
||||
Release 9.3-dev
|
||||
* fix for ssh to support -M or ip/range
|
||||
|
||||
|
||||
Release 9.2
|
||||
* fix for http-post-form optional parameters
|
||||
|
|
|
@ -34,11 +34,12 @@ int32_t start_ssh(int32_t s, char *ip, int32_t port, unsigned char options, char
|
|||
if (new_session) {
|
||||
if (session) {
|
||||
ssh_disconnect(session);
|
||||
ssh_finalize();
|
||||
//ssh_finalize();
|
||||
ssh_free(session);
|
||||
} else {
|
||||
ssh_init();
|
||||
}
|
||||
|
||||
ssh_init();
|
||||
session = ssh_new();
|
||||
ssh_options_set(session, SSH_OPTIONS_PORT, &port);
|
||||
ssh_options_set(session, SSH_OPTIONS_HOST, hydra_address2string(ip));
|
||||
|
@ -173,6 +174,7 @@ int32_t service_ssh_init(char *ip, int32_t sp, unsigned char options, char *misc
|
|||
// 3 skip target because its unreachable
|
||||
#ifdef LIBSSH
|
||||
int32_t rc, method;
|
||||
ssh_init();
|
||||
ssh_session session = ssh_new();
|
||||
|
||||
if (verbose || debug)
|
||||
|
|
|
@ -33,8 +33,9 @@ int32_t start_sshkey(int32_t s, char *ip, int32_t port, unsigned char options, c
|
|||
if (new_session) {
|
||||
if (session) {
|
||||
ssh_disconnect(session);
|
||||
ssh_finalize();
|
||||
ssh_free(session);
|
||||
} else {
|
||||
ssh_init();
|
||||
}
|
||||
|
||||
session = ssh_new();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue