Merge pull request #235 from mindon/master

Reset redirect flag and fix redirect port error issue
This commit is contained in:
van Hauser 2017-06-24 15:54:43 +02:00 committed by GitHub
commit 6a1b58c74b

View file

@ -468,7 +468,8 @@ return -1 if no response from server
*/ */
int analyze_server_response(int s) { int analyze_server_response(int s) {
int runs = 0; int runs = 0;
redirected_flag = 0;
auth_flag = 0;
while ((buf = hydra_receive_line(s)) != NULL) { while ((buf = hydra_receive_line(s)) != NULL) {
runs++; runs++;
//check for http redirection //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] = '/'; str3[0] = '/';
} }
if(strrchr(url, ':') == NULL && port != 80) {
sprintf(str2, "%s:%d", str2, port);
}
if (verbose) if (verbose)
hydra_report(stderr, "[VERBOSE] Page redirected to http://%s%s\n", str2, str3); hydra_report(stderr, "[VERBOSE] Page redirected to http://%s%s\n", str2, str3);