mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-08-13 01:57:30 -07:00
http-form-fix for OSX and *BSD
This commit is contained in:
parent
406e0f0714
commit
61386fa275
2 changed files with 5 additions and 3 deletions
1
CHANGES
1
CHANGES
|
@ -4,6 +4,7 @@ Changelog for hydra
|
|||
Release 8.2-pre
|
||||
* Added xhydra gtk patche by Petar Kaleychev to support modules that do not use usernames
|
||||
* Better library finding in ./configure for SVN + support for Darwin Homebrew
|
||||
* Fixed http-form module crash that only occurs on *BSD/OSX systems. Thanks to zdk for reporting!
|
||||
* ... your patch?
|
||||
|
||||
|
||||
|
|
|
@ -974,8 +974,8 @@ 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];
|
||||
static char newstring[1024];
|
||||
char *c, oldstring[1024], newstring[1024];
|
||||
static char finalstring[1024];
|
||||
|
||||
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)))
|
||||
|
@ -1011,7 +1011,8 @@ char *hydra_strrep(char *string, char *oldpiece, char *newpiece) {
|
|||
strcpy(newstring + newstr_index, oldstring + str_index);
|
||||
strcpy(oldstring, newstring);
|
||||
// }
|
||||
return newstring;
|
||||
strcpy(finalstring, newstring);
|
||||
return finalstring;
|
||||
}
|
||||
|
||||
unsigned char hydra_conv64(unsigned char in) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue