Merge pull request #720 from alrs/ip-equal

modules/arp_spoof: use net.IP to compare addresses
This commit is contained in:
Simone Margaritelli 2020-05-04 12:57:32 +02:00 committed by GitHub
commit 1957d34ca2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -252,7 +252,7 @@ func (mod *ArpSpoofer) arpSpoofTargets(saddr net.IP, smac net.HardwareAddr, chec
isSpoofing := false
// are we spoofing the gateway IP?
if bytes.Equal(saddr, gwIP) {
if net.IP.Equal(saddr, gwIP) {
isGW = true
// are we restoring the original MAC of the gateway?
if !bytes.Equal(smac, gwHW) {