mirror of https://github.com/daffainfo/nuclei.git
adding dns label to matched dns queries
parent
11569cc8e8
commit
cdcdb44b29
|
@ -317,11 +317,12 @@ func buildOutputDNS(template *templates.Template, msg *dns.Msg, extractorResults
|
|||
builder := &strings.Builder{}
|
||||
builder.WriteRune('[')
|
||||
builder.WriteString(template.ID)
|
||||
builder.WriteString("] ")
|
||||
builder.WriteString("] [dns] ")
|
||||
|
||||
// domain name from question
|
||||
if len(msg.Question) > 0 {
|
||||
domain := msg.Question[0].Name
|
||||
domain = strings.TrimSuffix(domain, ".")
|
||||
builder.WriteString(domain)
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ func (m *Matcher) Match(resp *http.Response, body, headers string) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
// MatchDNS matches a dns response again a given matcher
|
||||
// MatchDNS matches a dns response against a given matcher
|
||||
func (m *Matcher) MatchDNS(msg *dns.Msg) bool {
|
||||
switch m.matcherType {
|
||||
// [WIP] add dns status code matcher
|
||||
|
|
Loading…
Reference in New Issue