mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-08-20 05:13:51 -07:00
ssl,ssh and http-form fixes
This commit is contained in:
parent
852aa716f5
commit
725d14b9a5
3 changed files with 6 additions and 4 deletions
2
configure
vendored
2
configure
vendored
|
@ -191,7 +191,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
SSLNEW=""
|
SSLNEW=""
|
||||||
if [ "X" = "X$WSSL_PATH" ]; then
|
if [ "X" = "X$SSL_PATH" ]; then
|
||||||
SSL_PATH="$i"
|
SSL_PATH="$i"
|
||||||
SSLNEW=`grep SHA256_CTX $i/openssl/sha.h 2> /dev/null`
|
SSLNEW=`grep SHA256_CTX $i/openssl/sha.h 2> /dev/null`
|
||||||
else
|
else
|
||||||
|
|
|
@ -432,7 +432,7 @@ char *html_encode(char *string) {
|
||||||
if (index(ret, '&') != NULL)
|
if (index(ret, '&') != NULL)
|
||||||
ret = hydra_strrep(ret, "&", "%26");
|
ret = hydra_strrep(ret, "&", "%26");
|
||||||
if (index(ret, '#') != NULL)
|
if (index(ret, '#') != NULL)
|
||||||
ret = hydra_strrep(ret, "&", "%23");
|
ret = hydra_strrep(ret, "#", "%23");
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -480,7 +480,7 @@ int internal__hydra_connect_to_ssl(int socket) {
|
||||||
} else {
|
} else {
|
||||||
// if ((sslContext = SSL_CTX_new(SSLv23_client_method())) == NULL) {
|
// if ((sslContext = SSL_CTX_new(SSLv23_client_method())) == NULL) {
|
||||||
#ifndef TLSv1_2_client_method
|
#ifndef TLSv1_2_client_method
|
||||||
#define TLSv1_2_client_method TLSv1_client_method
|
#define TLSv1_2_client_method TLSv1_client_method
|
||||||
#endif
|
#endif
|
||||||
if ((sslContext = SSL_CTX_new(TLSv1_2_client_method())) == NULL) {
|
if ((sslContext = SSL_CTX_new(TLSv1_2_client_method())) == NULL) {
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
|
@ -774,6 +774,7 @@ int hydra_connect_to_ssl(int socket) {
|
||||||
#ifdef LIBOPENSSL
|
#ifdef LIBOPENSSL
|
||||||
return (internal__hydra_connect_to_ssl(socket));
|
return (internal__hydra_connect_to_ssl(socket));
|
||||||
#else
|
#else
|
||||||
|
fprintf(stderr, "Error: not compiled with SSL\n");
|
||||||
return -1;
|
return -1;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -786,7 +787,8 @@ int hydra_connect_ssl(char *host, int port) {
|
||||||
#ifdef LIBOPENSSL
|
#ifdef LIBOPENSSL
|
||||||
return (internal__hydra_connect_ssl(host, port, SOCK_STREAM, 6));
|
return (internal__hydra_connect_ssl(host, port, SOCK_STREAM, 6));
|
||||||
#else
|
#else
|
||||||
return (internal__hydra_connect(host, port, SOCK_STREAM, 6));
|
fprintf(stderr, "Error: not compiled with SSL\n");
|
||||||
|
return -1;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue