mirror of
https://github.com/bettercap/bettercap
synced 2025-08-21 05:53:20 -07:00
misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
c838abbe25
commit
e57b94ee5d
1 changed files with 3 additions and 3 deletions
|
@ -1,6 +1,7 @@
|
|||
package modules
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"net"
|
||||
"time"
|
||||
|
@ -65,12 +66,11 @@ func (p ArpSpoofer) Author() string {
|
|||
}
|
||||
|
||||
func (p *ArpSpoofer) shouldSpoof(ip net.IP) bool {
|
||||
addr := ip.String()
|
||||
if ip.IsLoopback() == true {
|
||||
return false
|
||||
} else if addr == p.Session.Interface.IpAddress {
|
||||
} else if bytes.Compare(ip, p.Session.Interface.IP) == 0 {
|
||||
return false
|
||||
} else if addr == p.Session.Gateway.IpAddress {
|
||||
} else if bytes.Compare(ip, p.Session.Gateway.IP) == 0 {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue