Misc bug fixes

dev
Ice3man543 2021-01-12 13:20:46 +05:30
parent 50eafb29d1
commit 0023aaed77
3 changed files with 4 additions and 2 deletions

View File

@ -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)
}
}

View File

@ -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
}
}
}

View File

@ -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, "-", "_")))