From 7b053d71649b0abd358eb599b3b4b27f6d7ab7d6 Mon Sep 17 00:00:00 2001 From: GitAntoinee Date: Wed, 1 Apr 2020 15:52:47 +0200 Subject: [PATCH 1/4] Add optional option to skip pre-request --- hydra-http-form.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hydra-http-form.c b/hydra-http-form.c index 324fe6a..efe81ff 100644 --- a/hydra-http-form.c +++ b/hydra-http-form.c @@ -434,6 +434,16 @@ int32_t parse_options(char *miscptr, ptr_header_node *ptr_head) { sprintf(cookieurl, "%.1000s", hydra_strrep(miscptr + 2, "\\:", ":")); miscptr = ptr; break; + case 'g': // fall through + case 'G': + ptr = miscptr + 2; + while (*ptr != 0 && (*ptr != ':' || *(ptr - 1) == '\\')) + ptr++; + if (*ptr != 0) + *ptr++ = 0; + getcookie = 0; + miscptr = ptr; + break; case 'h': // add a new header at the end ptr = miscptr + 2; From bea3cf2bd13dd2fcf9116b4cb411c332f2e2f1cc Mon Sep 17 00:00:00 2001 From: GitAntoinee Date: Wed, 1 Apr 2020 15:58:00 +0200 Subject: [PATCH 2/4] Update help --- hydra-http-form.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hydra-http-form.c b/hydra-http-form.c index efe81ff..722a24a 100644 --- a/hydra-http-form.c +++ b/hydra-http-form.c @@ -1439,6 +1439,7 @@ void usage_http_form(const char *service) { "The following parameters are optional:\n" " (c|C)=/page/uri to define a different page to gather initial " "cookies from\n" + " (g|G)=optional to skip pre-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 " From 47f24cb2560631d2eceabaf4394ecf26743ceee1 Mon Sep 17 00:00:00 2001 From: Antoine <52006497+GitAntoinee@users.noreply.github.com> Date: Wed, 1 Apr 2020 17:37:44 +0200 Subject: [PATCH 3/4] Update help --- hydra-http-form.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hydra-http-form.c b/hydra-http-form.c index 722a24a..e851d97 100644 --- a/hydra-http-form.c +++ b/hydra-http-form.c @@ -1439,7 +1439,7 @@ void usage_http_form(const char *service) { "The following parameters are optional:\n" " (c|C)=/page/uri to define a different page to gather initial " "cookies from\n" - " (g|G)=optional to skip pre-request\n" + " (g|G)= skip pre-requests - only use this when no pre-cookies are required\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 " From f0424742e36bb6ef6ab96371c5082b7185d1c591 Mon Sep 17 00:00:00 2001 From: GitAntoinee Date: Wed, 1 Apr 2020 21:10:48 +0200 Subject: [PATCH 4/4] Fix indentation in help --- hydra-http-form.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hydra-http-form.c b/hydra-http-form.c index 722a24a..eb5a4ce 100644 --- a/hydra-http-form.c +++ b/hydra-http-form.c @@ -1439,7 +1439,7 @@ void usage_http_form(const char *service) { "The following parameters are optional:\n" " (c|C)=/page/uri to define a different page to gather initial " "cookies from\n" - " (g|G)=optional to skip pre-request\n" + " (g|G)= skip pre-requests - only use this when no pre-cookies are required\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 "