mirror of https://github.com/daffainfo/nuclei.git
Merge pull request #958 from projectdiscovery/bugfix-http-to-dsl-priority
Fixing priority in response to DSL mappingdev
commit
d0c5e9baf7
|
@ -91,14 +91,6 @@ func (r *Request) responseToDSLMap(resp *http.Response, host, matched, rawReq, r
|
||||||
for k, v := range extra {
|
for k, v := range extra {
|
||||||
data[k] = v
|
data[k] = v
|
||||||
}
|
}
|
||||||
|
|
||||||
data["host"] = host
|
|
||||||
data["matched"] = matched
|
|
||||||
data["request"] = rawReq
|
|
||||||
data["response"] = rawResp
|
|
||||||
data["content_length"] = resp.ContentLength
|
|
||||||
data["status_code"] = resp.StatusCode
|
|
||||||
data["body"] = body
|
|
||||||
for _, cookie := range resp.Cookies() {
|
for _, cookie := range resp.Cookies() {
|
||||||
data[strings.ToLower(cookie.Name)] = cookie.Value
|
data[strings.ToLower(cookie.Name)] = cookie.Value
|
||||||
}
|
}
|
||||||
|
@ -106,6 +98,13 @@ func (r *Request) responseToDSLMap(resp *http.Response, host, matched, rawReq, r
|
||||||
k = strings.ToLower(strings.ReplaceAll(strings.TrimSpace(k), "-", "_"))
|
k = strings.ToLower(strings.ReplaceAll(strings.TrimSpace(k), "-", "_"))
|
||||||
data[k] = strings.Join(v, " ")
|
data[k] = strings.Join(v, " ")
|
||||||
}
|
}
|
||||||
|
data["host"] = host
|
||||||
|
data["matched"] = matched
|
||||||
|
data["request"] = rawReq
|
||||||
|
data["response"] = rawResp
|
||||||
|
data["status_code"] = resp.StatusCode
|
||||||
|
data["body"] = body
|
||||||
|
data["content_length"] = resp.ContentLength
|
||||||
data["all_headers"] = headers
|
data["all_headers"] = headers
|
||||||
data["duration"] = duration.Seconds()
|
data["duration"] = duration.Seconds()
|
||||||
data["template-id"] = r.options.TemplateID
|
data["template-id"] = r.options.TemplateID
|
||||||
|
|
Loading…
Reference in New Issue