This commit is contained in:
van Hauser 2017-05-20 15:44:42 +02:00
commit 3ed91cd18f
4 changed files with 6 additions and 4 deletions

View file

@ -2,7 +2,7 @@ Changelog for hydra
------------------- -------------------
Release 8.6-dev Release 8.6-dev
* ... * http-form module now supports URLs up to 6000 bytes (thanks to petrock6@github for the patch)
Release 8.5 Release 8.5

View file

@ -454,6 +454,8 @@ char *html_encode(char *string) {
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");
if (index(ret, '=') != NULL)
ret = hydra_strrep(ret, "=", "%3D");
return ret; return ret;
} }

View file

@ -1043,8 +1043,8 @@ char *hydra_strrep(char *string, char *oldpiece, char *newpiece) {
char *c, oldstring[6096], newstring[6096]; //updated due to issue 192 on github. char *c, oldstring[6096], newstring[6096]; //updated due to issue 192 on github.
static char finalstring[6096]; static char finalstring[6096];
if(strlen(string) > 6096) { if(strlen(string) > 6000) {
hydra_report(stderr, "[ERROR] Supplied URL or POST data too large. Max limit is 6096 characters.\n"); hydra_report(stderr, "[ERROR] Supplied URL or POST data too large. Max limit is 6000 characters.\n");
exit(-1); exit(-1);
} }

View file

@ -3284,7 +3284,7 @@ int main(int argc, char *argv[]) {
if (strstr(hydra_options.miscptr, "\\:") != NULL) { if (strstr(hydra_options.miscptr, "\\:") != NULL) {
fprintf(stderr, "[INFORMATION] escape sequence \\: detected in module option, no parameter verification is performed.\n"); fprintf(stderr, "[INFORMATION] escape sequence \\: detected in module option, no parameter verification is performed.\n");
} else { } else {
sprintf(bufferurl, "%.6096s", hydra_options.miscptr); sprintf(bufferurl, "%.6000s", hydra_options.miscptr);
url = strtok(bufferurl, ":"); url = strtok(bufferurl, ":");
variables = strtok(NULL, ":"); variables = strtok(NULL, ":");
cond = strtok(NULL, ":"); cond = strtok(NULL, ":");