mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-08-21 22:03:46 -07:00
make thread-safe against old openssl versions
This commit is contained in:
parent
6327932350
commit
4e1bdf4183
1 changed files with 2 additions and 0 deletions
|
@ -33,6 +33,7 @@ int32_t start_ssh(int32_t s, char *ip, int32_t port, unsigned char options, char
|
|||
if (strlen(pass = hydra_get_next_password()) == 0)
|
||||
pass = empty;
|
||||
|
||||
|
||||
if (new_session) {
|
||||
if (session) {
|
||||
ssh_disconnect(session);
|
||||
|
@ -40,6 +41,7 @@ int32_t start_ssh(int32_t s, char *ip, int32_t port, unsigned char options, char
|
|||
ssh_free(session);
|
||||
}
|
||||
|
||||
ssh_init();
|
||||
session = ssh_new();
|
||||
ssh_options_set(session, SSH_OPTIONS_PORT, &port);
|
||||
ssh_options_set(session, SSH_OPTIONS_HOST, hydra_address2string(ip));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue