misc: small fix or general refactoring i did not bother commenting

This commit is contained in:
evilsocket 2018-02-11 20:17:43 +01:00
commit e57b94ee5d

View file

@ -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