diff --git a/v2/pkg/protocols/common/generators/load.go b/v2/pkg/protocols/common/generators/load.go index 0c44b613..8c449e81 100644 --- a/v2/pkg/protocols/common/generators/load.go +++ b/v2/pkg/protocols/common/generators/load.go @@ -2,6 +2,7 @@ package generators import ( "bufio" + "fmt" "io" "os" "strings" @@ -29,6 +30,7 @@ func loadPayloads(payloads map[string]interface{}) (map[string][]string, error) loadedPayloads[name] = payloads } case interface{}: + fmt.Printf("%v elements\n", pt) loadedPayloads[name] = cast.ToStringSlice(pt) } } diff --git a/v2/pkg/protocols/http/http.go b/v2/pkg/protocols/http/http.go index f2a5d18b..84018c73 100644 --- a/v2/pkg/protocols/http/http.go +++ b/v2/pkg/protocols/http/http.go @@ -114,7 +114,7 @@ func (r *Request) Compile(options *protocols.ExecuterOptions) error { if err != nil { return errors.Wrap(err, "could not read payload file") } - r.Payloads[name] = []interface{}{final} + r.Payloads[name] = final } } } diff --git a/v2/pkg/protocols/http/operators.go b/v2/pkg/protocols/http/operators.go index 470c3c58..f9462fd4 100644 --- a/v2/pkg/protocols/http/operators.go +++ b/v2/pkg/protocols/http/operators.go @@ -96,7 +96,7 @@ func (r *Request) responseToDSLMap(resp *http.Response, host, matched, rawReq, r data["body"] = body for _, cookie := range resp.Cookies() { - data[cookie.Name] = cookie.Value + data[strings.ToLower(cookie.Name)] = cookie.Value } for k, v := range resp.Header { k = strings.ToLower(strings.TrimSpace(strings.ReplaceAll(k, "-", "_")))