mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 05:25:25 +00:00
fixing linting
This commit is contained in:
parent
0ae73711fc
commit
2a8aaeaa2e
@ -436,7 +436,7 @@ func (e *HTTPExecuter) handleHTTP(reqURL string, request *requests.HTTPRequest,
|
||||
// hardcode stopping storing data after 100 items (approximately 20 requests)
|
||||
if len(result.historyData) < 150 {
|
||||
result.Lock()
|
||||
result.historyData = generators.MergeMaps(result.historyData, matchers.HttpToMap(resp, body, headers, duration, format))
|
||||
result.historyData = generators.MergeMaps(result.historyData, matchers.HTTPToMap(resp, body, headers, duration, format))
|
||||
result.Unlock()
|
||||
}
|
||||
|
||||
|
||||
@ -46,7 +46,7 @@ func (m *Matcher) Match(resp *http.Response, body, headers string, duration time
|
||||
}
|
||||
case DSLMatcher:
|
||||
// Match complex query
|
||||
return m.isNegative(m.matchDSL(generators.MergeMaps(HttpToMap(resp, body, headers, duration, ""), data)))
|
||||
return m.isNegative(m.matchDSL(generators.MergeMaps(HTTPToMap(resp, body, headers, duration, ""), data)))
|
||||
}
|
||||
|
||||
return false
|
||||
@ -69,7 +69,7 @@ func (m *Matcher) MatchDNS(msg *dns.Msg) bool {
|
||||
return m.matchBinary(msg.String())
|
||||
case DSLMatcher:
|
||||
// Match complex query
|
||||
return m.matchDSL(DnsToMap(msg, ""))
|
||||
return m.matchDSL(DNSToMap(msg, ""))
|
||||
}
|
||||
|
||||
return false
|
||||
|
||||
@ -12,8 +12,8 @@ import (
|
||||
|
||||
const defaultFormat = "%s"
|
||||
|
||||
// HttpToMap Converts HTTP to Matcher Map
|
||||
func HttpToMap(resp *http.Response, body, headers string, duration time.Duration, format string) (m map[string]interface{}) {
|
||||
// HTTPToMap Converts HTTP to Matcher Map
|
||||
func HTTPToMap(resp *http.Response, body, headers string, duration time.Duration, format string) (m map[string]interface{}) {
|
||||
m = make(map[string]interface{})
|
||||
|
||||
if format == "" {
|
||||
@ -41,8 +41,8 @@ func HttpToMap(resp *http.Response, body, headers string, duration time.Duration
|
||||
return m
|
||||
}
|
||||
|
||||
// DnsToMap Converts DNS to Matcher Map
|
||||
func DnsToMap(msg *dns.Msg, format string) (m map[string]interface{}) {
|
||||
// DNSToMap Converts DNS to Matcher Map
|
||||
func DNSToMap(msg *dns.Msg, format string) (m map[string]interface{}) {
|
||||
m = make(map[string]interface{})
|
||||
|
||||
if format == "" {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user