From 8365904ed503f9219a8fe846338e33e4a13eeada Mon Sep 17 00:00:00 2001 From: evilsocket Date: Sat, 24 Feb 2018 19:04:33 +0100 Subject: [PATCH] fix: skipping zeroed BSSID --- modules/wifi_recon.go | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/modules/wifi_recon.go b/modules/wifi_recon.go index 59aeea38..7bf557b1 100644 --- a/modules/wifi_recon.go +++ b/modules/wifi_recon.go @@ -378,12 +378,22 @@ func (w *WiFiRecon) startDeauth(to net.HardwareAddr) error { return fmt.Errorf("%s is an unknown BSSID.", bssid) } +func isZeroBSSID(bssid net.HardwareAddr) bool { + for _, b := range bssid { + if b != 0x00 { + 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 { - bssid := dot11.Address3.String() - frequency := int(radiotap.ChannelFrequency) - w.Session.WiFi.AddIfNew(ssid, bssid, frequency, radiotap.DBMAntennaSignal) + if isZeroBSSID(dot11.Address3) == false { + bssid := dot11.Address3.String() + frequency := int(radiotap.ChannelFrequency) + w.Session.WiFi.AddIfNew(ssid, bssid, frequency, radiotap.DBMAntennaSignal) + } } }