mirror of https://github.com/daffainfo/nuclei.git
Misc bug fixes
parent
50eafb29d1
commit
0023aaed77
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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, "-", "_")))
|
||||
|
|
Loading…
Reference in New Issue