mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-08-20 13:23:57 -07:00
add newline characters, fix option description in hydra-http-form.c
This commit is contained in:
parent
f6723f61b1
commit
6a57bd6877
1 changed files with 6 additions and 6 deletions
|
@ -323,7 +323,7 @@ void hdrrep(ptr_header_node *ptr_head, char *oldvalue, char *newvalue) {
|
||||||
if (cur_ptr->value)
|
if (cur_ptr->value)
|
||||||
strcpy(cur_ptr->value, newvalue);
|
strcpy(cur_ptr->value, newvalue);
|
||||||
else {
|
else {
|
||||||
hydra_report(stderr, "[ERROR] Out of memory (hddrep).");
|
hydra_report(stderr, "[ERROR] Out of memory (hddrep).\n");
|
||||||
hydra_child_exit(0);
|
hydra_child_exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -342,7 +342,7 @@ void hdrrepv(ptr_header_node *ptr_head, char *hdrname, char *new_value) {
|
||||||
if (cur_ptr->value)
|
if (cur_ptr->value)
|
||||||
strcpy(cur_ptr->value, new_value);
|
strcpy(cur_ptr->value, new_value);
|
||||||
else {
|
else {
|
||||||
hydra_report(stderr, "[ERROR] Out of memory (hdrrepv %lu)", strlen(new_value) + 1);
|
hydra_report(stderr, "[ERROR] Out of memory (hdrrepv %lu)\n", strlen(new_value) + 1);
|
||||||
hydra_child_exit(0);
|
hydra_child_exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -434,7 +434,7 @@ int32_t parse_options(char *miscptr, ptr_header_node *ptr_head) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Error: abort execution
|
// Error: abort execution
|
||||||
hydra_report(stderr, "[ERROR] Out of memory for HTTP headers (h).");
|
hydra_report(stderr, "[ERROR] Out of memory for HTTP headers (h).\n");
|
||||||
return 0;
|
return 0;
|
||||||
case 'H':
|
case 'H':
|
||||||
// add a new header, or replace an existing one's value
|
// add a new header, or replace an existing one's value
|
||||||
|
@ -465,7 +465,7 @@ int32_t parse_options(char *miscptr, ptr_header_node *ptr_head) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Error: abort execution
|
// Error: abort execution
|
||||||
hydra_report(stderr, "[ERROR] Out of memory for HTTP headers (H).");
|
hydra_report(stderr, "[ERROR] Out of memory for HTTP headers (H).\n");
|
||||||
return 0;
|
return 0;
|
||||||
// no default
|
// no default
|
||||||
}
|
}
|
||||||
|
@ -1299,7 +1299,7 @@ ptr_header_node initialize(char *ip, unsigned char options, char *miscptr) {
|
||||||
strncat(proxy_string, proxy_authentication[selected_proxy], strlen(proxy_authentication[selected_proxy]) - 6);
|
strncat(proxy_string, proxy_authentication[selected_proxy], strlen(proxy_authentication[selected_proxy]) - 6);
|
||||||
add_header(&ptr_head, "Proxy-Authorization", proxy_string, HEADER_TYPE_DEFAULT);
|
add_header(&ptr_head, "Proxy-Authorization", proxy_string, HEADER_TYPE_DEFAULT);
|
||||||
} else {
|
} else {
|
||||||
hydra_report(stderr, "Out of memory for \"Proxy-Authorization\" header.");
|
hydra_report(stderr, "Out of memory for \"Proxy-Authorization\" header.\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (getcookie) {
|
if (getcookie) {
|
||||||
|
@ -1362,7 +1362,7 @@ void usage_http_form(const char *service) {
|
||||||
" This is where most people get it wrong. You have to check the webapp what a\n"
|
" This is where most people get it wrong. You have to check the webapp what a\n"
|
||||||
" failed string looks like and put it in this parameter!\n"
|
" failed string looks like and put it in this parameter!\n"
|
||||||
"The following parameters are optional:\n"
|
"The following parameters are optional:\n"
|
||||||
" C=/page/uri to define a different page to gather initial cookies from\n"
|
" (c|C)=/page/uri to define a different page to gather initial cookies from\n"
|
||||||
" (h|H)=My-Hdr\\: foo to send a user defined HTTP header with each request\n"
|
" (h|H)=My-Hdr\\: foo to send a user defined HTTP header with each request\n"
|
||||||
" ^USER[64]^ and ^PASS[64]^ can also be put into these headers!\n"
|
" ^USER[64]^ and ^PASS[64]^ can also be put into these headers!\n"
|
||||||
" Note: 'h' will add the user-defined header at the end\n"
|
" Note: 'h' will add the user-defined header at the end\n"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue