mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -07:00
fix: skipping broadcast bssid in wifi.recon
This commit is contained in:
parent
f7bf0c6b3e
commit
ae7ce29986
1 changed files with 11 additions and 1 deletions
|
@ -402,10 +402,20 @@ func isZeroBSSID(bssid net.HardwareAddr) bool {
|
|||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func isBroadcastBSSID(bssid net.HardwareAddr) bool {
|
||||
for _, b := range bssid {
|
||||
if b != 0xff {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func (w *WiFiRecon) discoverAccessPoints(radiotap *layers.RadioTap, dot11 *layers.Dot11, packet gopacket.Packet) {
|
||||
// search for Dot11InformationElementIDSSID
|
||||
if ok, ssid := packets.Dot11ParseIDSSID(packet); ok == true {
|
||||
if isZeroBSSID(dot11.Address3) == false {
|
||||
if isZeroBSSID(dot11.Address3) == false && isBroadcastBSSID(dot11.Address3) == false {
|
||||
bssid := dot11.Address3.String()
|
||||
frequency := int(radiotap.ChannelFrequency)
|
||||
w.Session.WiFi.AddIfNew(ssid, bssid, frequency, radiotap.DBMAntennaSignal)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue