From 62f06dce245d8df65e9a41c398f91224d0b073d1 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Fri, 26 Jun 2020 11:49:18 +0100 Subject: [PATCH 1/2] Usage: Fix help for https-post-form and https-get-form Fixes issue #530 --- hydra.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hydra.c b/hydra.c index 5e1dd87..2883b2f 100644 --- a/hydra.c +++ b/hydra.c @@ -619,6 +619,10 @@ void module_usage() { "%s:\n================================================================" "============\n", hydra_options.service); + if (strcmp(hydra_options.service, "https-post-form") == 0) + strcpy(hydra_options.service, "http-post-form"); + else if (strcmp(hydra_options.service, "https-get-form") == 0) + strcpy(hydra_options.service, "http-get-form"); for (i = 0; i < sizeof(services) / sizeof(services[0]); i++) { if (strcmp(hydra_options.service, services[i].name) == 0) { if (services[i].usage) { From 5ec8a3e5e9fcdd6b2389f00665d2d9a2115ac7c8 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Fri, 26 Jun 2020 15:31:20 +0100 Subject: [PATCH 2/2] Makes change work on any sting starting with https As per suggestion, the code now remvoes the 's' on any module starting with https- --- hydra.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hydra.c b/hydra.c index 2883b2f..3eaefcc 100644 --- a/hydra.c +++ b/hydra.c @@ -619,10 +619,8 @@ void module_usage() { "%s:\n================================================================" "============\n", hydra_options.service); - if (strcmp(hydra_options.service, "https-post-form") == 0) - strcpy(hydra_options.service, "http-post-form"); - else if (strcmp(hydra_options.service, "https-get-form") == 0) - strcpy(hydra_options.service, "http-get-form"); + if (strncmp(hydra_options.service, "https-", 6) == 0 ) + memmove(hydra_options.service + 4, hydra_options.service + 5, strlen(hydra_options.service) - 4); for (i = 0; i < sizeof(services) / sizeof(services[0]); i++) { if (strcmp(hydra_options.service, services[i].name) == 0) { if (services[i].usage) {