fix: don't overwrite full WPS map when new info arrive

This commit is contained in:
evilsocket 2019-01-27 15:06:43 +01:00
commit 2c2be3149d
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
2 changed files with 4 additions and 1 deletions

View file

@ -284,7 +284,9 @@ func (w *WiFiModule) updateInfo(dot11 *layers.Dot11, packet gopacket.Packet) {
if ok, bssid, info := packets.Dot11ParseWPS(packet, dot11); ok {
if station, found := w.Session.WiFi.Get(bssid.String()); found {
station.WPS = info
for name, value := range info {
station.WPS[name] = value
}
}
}
}

View file

@ -34,6 +34,7 @@ func NewStation(essid, bssid string, frequency int, rssi int8) *Station {
Endpoint: NewEndpointNoResolve(MonitorModeAddress, bssid, cleanESSID(essid), 0),
Frequency: frequency,
RSSI: rssi,
WPS: make(map[string]string),
}
}