Bugfix for issue 121 -- increased URL/POST/cookie data size to 6096 bytes from 1000 bytes.

This commit is contained in:
petrock6 2017-05-20 02:58:47 -05:00
commit df5ec9ea30
3 changed files with 22 additions and 16 deletions

View file

@ -1040,8 +1040,13 @@ int make_to_lower(char *buf) {
char *hydra_strrep(char *string, char *oldpiece, char *newpiece) {
int str_index, newstr_index, oldpiece_index, end, new_len, old_len, cpy_len;
char *c, oldstring[1024], newstring[1024];
static char finalstring[1024];
char *c, oldstring[6096], newstring[6096]; //updated due to issue 192 on github.
static char finalstring[6096];
if(strlen(string) > 6096) {
hydra_report(stderr, "[ERROR] Supplied URL or POST data too large. Max limit is 6096 characters.\n");
exit(-1);
}
if (string == NULL || oldpiece == NULL || newpiece == NULL || strlen(string) >= sizeof(oldstring) - 1
|| (strlen(string) + strlen(newpiece) - strlen(oldpiece) >= sizeof(newstring) - 1 && strlen(string) > strlen(oldpiece)))