From 89f8fd99c2e6133d005279c03d3b8e0a3613f126 Mon Sep 17 00:00:00 2001 From: its-a-feature Date: Fri, 4 Oct 2024 16:25:33 -0500 Subject: [PATCH] fixing issue with query params --- .../httpx/httpx/c2_code/webserver/initialize.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/C2_Profiles/httpx/httpx/c2_code/webserver/initialize.go b/C2_Profiles/httpx/httpx/c2_code/webserver/initialize.go index 3cdbfd9..759cb49 100644 --- a/C2_Profiles/httpx/httpx/c2_code/webserver/initialize.go +++ b/C2_Profiles/httpx/httpx/c2_code/webserver/initialize.go @@ -308,13 +308,9 @@ func getMessageFromClient(req *http.Request, variation AgentVariationConfig) ([] } return transformMessageFromClient([]byte(cookie.Value), variation) case "query": - err := req.ParseForm() - if err != nil { - logging.LogError(err, "Failed to parse form") - return nil, err - } - if req.Form.Has(variation.Client.Message.Name) { - param := req.Form.Get(variation.Client.Message.Name) + params := req.URL.Query() + if params.Has(variation.Client.Message.Name) { + param := params.Get(variation.Client.Message.Name) return transformMessageFromClient([]byte(param), variation) } return nil, errors.New("failed to find form variable")