mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 13:09:49 -07:00
lint: remove comparisons to bool
This commit is contained in:
parent
9f611beaa0
commit
851e39c11b
2 changed files with 2 additions and 2 deletions
|
@ -124,7 +124,7 @@ func (p *HTTPProxy) Configure(address string, proxyPort int, httpPort int, scrip
|
||||||
}
|
}
|
||||||
|
|
||||||
if p.jsHook == "" && jsToInject != "" {
|
if p.jsHook == "" && jsToInject != "" {
|
||||||
if strings.HasPrefix(jsToInject, "<script ") == false {
|
if !strings.HasPrefix(jsToInject, "<script ") {
|
||||||
jsToInject = fmt.Sprintf("<script type=\"text/javascript\">%s</script>", jsToInject)
|
jsToInject = fmt.Sprintf("<script type=\"text/javascript\">%s</script>", jsToInject)
|
||||||
}
|
}
|
||||||
p.jsHook = fmt.Sprintf("%s</head>", jsToInject)
|
p.jsHook = fmt.Sprintf("%s</head>", jsToInject)
|
||||||
|
|
|
@ -35,7 +35,7 @@ func mdnsParser(ip *layers.IPv4, pkt gopacket.Packet, udp *layers.UDP) bool {
|
||||||
for _, answer := range answers {
|
for _, answer := range answers {
|
||||||
if answer.Type == layers.DNSTypeA || answer.Type == layers.DNSTypeAAAA {
|
if answer.Type == layers.DNSTypeA || answer.Type == layers.DNSTypeAAAA {
|
||||||
hostname := string(answer.Name)
|
hostname := string(answer.Name)
|
||||||
if _, found := m[hostname]; found == false {
|
if _, found := m[hostname]; !found {
|
||||||
m[hostname] = make([]string, 0)
|
m[hostname] = make([]string, 0)
|
||||||
}
|
}
|
||||||
m[hostname] = append(m[hostname], answer.IP.String())
|
m[hostname] = append(m[hostname], answer.IP.String())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue