mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-07-05 12:36:09 -07:00
fixed off-by-one bug
This commit is contained in:
parent
8e3e5db7ba
commit
a6eda41751
2 changed files with 94 additions and 4 deletions
|
@ -1342,10 +1342,10 @@ ptr_header_node initialize(char *ip, unsigned char options, char *miscptr) {
|
|||
// proxy with authentication
|
||||
add_header(&ptr_head, "Host", webtarget, HEADER_TYPE_DEFAULT);
|
||||
add_header(&ptr_head, "User-Agent", "Mozilla 5.0 (Hydra Proxy Auth)", HEADER_TYPE_DEFAULT);
|
||||
proxy_string = (char *) malloc(strlen(proxy_authentication[selected_proxy]) + 6);
|
||||
proxy_string = (char *) malloc(strlen(proxy_authentication[selected_proxy]) + 10);
|
||||
if (proxy_string) {
|
||||
strcpy(proxy_string, "Basic ");
|
||||
strncat(proxy_string, proxy_authentication[selected_proxy], strlen(proxy_authentication[selected_proxy]) - 6);
|
||||
strcat(proxy_string, proxy_authentication[selected_proxy]);
|
||||
add_header(&ptr_head, "Proxy-Authorization", proxy_string, HEADER_TYPE_DEFAULT);
|
||||
} else {
|
||||
hydra_report(stderr, "Out of memory for \"Proxy-Authorization\" header.\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue