mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-07-06 04:51:40 -07:00
Merge pull request #348 from mathewmarcus/fix_issue_347
set cookie for http-form-post redirects
This commit is contained in:
commit
edfaeed0a3
1 changed files with 9 additions and 0 deletions
|
@ -997,6 +997,15 @@ int32_t start_http_form(int32_t s, char *ip, int32_t port, unsigned char options
|
||||||
if (header_exists(&ptr_head, "Content-Length", HEADER_TYPE_DEFAULT))
|
if (header_exists(&ptr_head, "Content-Length", HEADER_TYPE_DEFAULT))
|
||||||
hdrrepv(&ptr_head, "Content-Length", "0");
|
hdrrepv(&ptr_head, "Content-Length", "0");
|
||||||
|
|
||||||
|
// re-use the above code to set cookies
|
||||||
|
if (cookie_header != NULL)
|
||||||
|
free(cookie_header);
|
||||||
|
cookie_header = stringify_cookies(ptr_cookie);
|
||||||
|
if (!header_exists(&ptr_head, "Cookie", HEADER_TYPE_DEFAULT))
|
||||||
|
add_header(&ptr_head, "Cookie", cookie_header, HEADER_TYPE_DEFAULT);
|
||||||
|
else
|
||||||
|
hdrrepv(&ptr_head, "Cookie", cookie_header);
|
||||||
|
|
||||||
//re-use the code above to check for proxy use
|
//re-use the code above to check for proxy use
|
||||||
if (use_proxy == 1 && proxy_authentication[selected_proxy] != NULL) {
|
if (use_proxy == 1 && proxy_authentication[selected_proxy] != NULL) {
|
||||||
// proxy with authentication
|
// proxy with authentication
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue