Skip to content

Commit

Permalink
fixing issue with query params
Browse files Browse the repository at this point in the history
  • Loading branch information
its-a-feature committed Oct 4, 2024
1 parent 00ad760 commit 89f8fd9
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions C2_Profiles/httpx/httpx/c2_code/webserver/initialize.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 89f8fd9

Please sign in to comment.