mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 21:43:18 -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
|
package modules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
"time"
|
"time"
|
||||||
|
@ -65,12 +66,11 @@ func (p ArpSpoofer) Author() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *ArpSpoofer) shouldSpoof(ip net.IP) bool {
|
func (p *ArpSpoofer) shouldSpoof(ip net.IP) bool {
|
||||||
addr := ip.String()
|
|
||||||
if ip.IsLoopback() == true {
|
if ip.IsLoopback() == true {
|
||||||
return false
|
return false
|
||||||
} else if addr == p.Session.Interface.IpAddress {
|
} else if bytes.Compare(ip, p.Session.Interface.IP) == 0 {
|
||||||
return false
|
return false
|
||||||
} else if addr == p.Session.Gateway.IpAddress {
|
} else if bytes.Compare(ip, p.Session.Gateway.IP) == 0 {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue