mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-07-05 12:36:09 -07:00
SSL SNI support; important http-*:// fix; also http-post support added
This commit is contained in:
parent
4c25bddad7
commit
1579369097
52 changed files with 437 additions and 418 deletions
|
@ -5,7 +5,7 @@ extern char *HYDRA_EXIT;
|
|||
char *buf;
|
||||
static int http_proxy_auth_mechanism = AUTH_ERROR;
|
||||
|
||||
int start_http_proxy_urlenum(int s, char *ip, int port, unsigned char options, char *miscptr, FILE * fp) {
|
||||
int start_http_proxy_urlenum(int s, char *ip, int port, unsigned char options, char *miscptr, FILE * fp, char *hostname) {
|
||||
char *empty = "";
|
||||
char *login, *pass, buffer[500], buffer2[500], mlogin[260], mpass[260], mhost[260];
|
||||
char url[260], host[30];
|
||||
|
@ -66,7 +66,7 @@ int start_http_proxy_urlenum(int s, char *ip, int port, unsigned char options, c
|
|||
if ((options & OPTION_SSL) == 0) {
|
||||
s = hydra_connect_tcp(ip, port);
|
||||
} else {
|
||||
s = hydra_connect_ssl(ip, port);
|
||||
s = hydra_connect_ssl(ip, port, hostname);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -228,7 +228,7 @@ int start_http_proxy_urlenum(int s, char *ip, int port, unsigned char options, c
|
|||
return 1;
|
||||
}
|
||||
|
||||
void service_http_proxy_urlenum(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port) {
|
||||
void service_http_proxy_urlenum(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname) {
|
||||
int run = 1, next_run = 1, sock = -1;
|
||||
int myport = PORT_HTTP_PROXY, mysslport = PORT_HTTP_PROXY_SSL;
|
||||
|
||||
|
@ -252,7 +252,7 @@ void service_http_proxy_urlenum(char *ip, int sp, unsigned char options, char *m
|
|||
} else {
|
||||
if (port != 0)
|
||||
mysslport = port;
|
||||
sock = hydra_connect_ssl(ip, mysslport);
|
||||
sock = hydra_connect_ssl(ip, mysslport, hostname);
|
||||
port = mysslport;
|
||||
}
|
||||
if (sock < 0) {
|
||||
|
@ -263,7 +263,7 @@ void service_http_proxy_urlenum(char *ip, int sp, unsigned char options, char *m
|
|||
break;
|
||||
}
|
||||
case 2: /* run the cracking function */
|
||||
next_run = start_http_proxy_urlenum(sock, ip, port, options, miscptr, fp);
|
||||
next_run = start_http_proxy_urlenum(sock, ip, port, options, miscptr, fp, hostname);
|
||||
break;
|
||||
case 3: /* clean exit */
|
||||
if (sock >= 0)
|
||||
|
@ -278,7 +278,7 @@ void service_http_proxy_urlenum(char *ip, int sp, unsigned char options, char *m
|
|||
}
|
||||
}
|
||||
|
||||
int service_http_proxy_urlenum_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port) {
|
||||
int service_http_proxy_urlenum_init(char *ip, int sp, unsigned char options, char *miscptr, FILE * fp, int port, char *hostname) {
|
||||
// called before the childrens are forked off, so this is the function
|
||||
// which should be filled if initial connections and service setup has to be
|
||||
// performed once only.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue