mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-08-14 02:27:31 -07:00
Reset redirect flag and fix redirect port error issue
fix following 2 issues: 1. when fail is a redirect url, matched is not - but the redirect flag is still 1 - causing match missed 2. when redirect to a relative url on a port not 80, it fails to attach the port to the redirect url
This commit is contained in:
parent
51d881353b
commit
6a6c58c925
1 changed files with 6 additions and 1 deletions
|
@ -468,7 +468,8 @@ return -1 if no response from server
|
|||
*/
|
||||
int analyze_server_response(int s) {
|
||||
int runs = 0;
|
||||
|
||||
redirected_flag = 0;
|
||||
auth_flag = 0;
|
||||
while ((buf = hydra_receive_line(s)) != NULL) {
|
||||
runs++;
|
||||
//check for http redirection
|
||||
|
@ -848,6 +849,10 @@ int start_http_form(int s, char *ip, int port, unsigned char options, char *misc
|
|||
str3[0] = '/';
|
||||
}
|
||||
|
||||
if(strrchr(url, ':') == NULL && port != 80) {
|
||||
sprintf(str2, "%s:%d", str2, port);
|
||||
}
|
||||
|
||||
if (verbose)
|
||||
hydra_report(stderr, "[VERBOSE] Page redirected to http://%s%s\n", str2, str3);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue