mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -07:00
Shrink code.
This commit is contained in:
parent
40f3906115
commit
ccb2774814
1 changed files with 1 additions and 5 deletions
|
@ -29,16 +29,12 @@ func tabsToSpaces(s string) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *DNSProxy) logRequestAction(m *dns.Msg, clientIP string) {
|
func (p *DNSProxy) logRequestAction(m *dns.Msg, clientIP string) {
|
||||||
var questions []string
|
|
||||||
for _, q := range m.Question {
|
|
||||||
questions = append(questions, tabsToSpaces(q.String()))
|
|
||||||
}
|
|
||||||
p.Sess.Events.Add(p.Name+".spoofed-request", struct {
|
p.Sess.Events.Add(p.Name+".spoofed-request", struct {
|
||||||
Client string
|
Client string
|
||||||
Questions []string
|
Questions []string
|
||||||
}{
|
}{
|
||||||
clientIP,
|
clientIP,
|
||||||
questions,
|
questionsToStrings(m.Question),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue