From e57b94ee5dce5f22ef80d3f2f56b6e78c9022753 Mon Sep 17 00:00:00 2001 From: evilsocket Date: Sun, 11 Feb 2018 20:17:43 +0100 Subject: [PATCH] misc: small fix or general refactoring i did not bother commenting --- modules/arp_spoof.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/arp_spoof.go b/modules/arp_spoof.go index 9f53a4fb..ded712ea 100644 --- a/modules/arp_spoof.go +++ b/modules/arp_spoof.go @@ -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