mirror of
https://github.com/bettercap/bettercap
synced 2025-07-12 16:13:48 -07:00
misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
ccffeff28f
commit
c0981ea9e6
2 changed files with 2 additions and 1 deletions
|
@ -154,7 +154,7 @@ func (lan *LAN) shouldIgnore(ip, mac string) bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
// skip broadcast macs
|
// skip broadcast macs
|
||||||
if strings.ToLower(mac) == "ff:ff:ff:ff:ff:ff" {
|
if strings.ToLower(mac) == BroadcastMacS {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
// skip everything which is not in our subnet (multicast noise)
|
// skip everything which is not in our subnet (multicast noise)
|
||||||
|
|
|
@ -18,6 +18,7 @@ const (
|
||||||
|
|
||||||
var (
|
var (
|
||||||
BroadcastMac = []byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff}
|
BroadcastMac = []byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff}
|
||||||
|
BroadcastMacS = "ff:ff:ff:ff:ff:ff"
|
||||||
IPv4Validator = regexp.MustCompile("^[0-9\\.]+/?\\d*$")
|
IPv4Validator = regexp.MustCompile("^[0-9\\.]+/?\\d*$")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue