fix: allow wifi modules to use network aliases for clients never seen on lan

This commit is contained in:
evilsocket 2019-03-17 14:01:30 +01:00
commit 255102c250
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
5 changed files with 15 additions and 10 deletions

View file

@ -124,7 +124,7 @@ func (mod *WiFiModule) discoverClients(radiotap *layers.RadioTap, dot11 *layers.
freq := int(radiotap.ChannelFrequency)
rssi := radiotap.DBMAntennaSignal
if station, isNew := ap.AddClientIfNew(bssid, freq, rssi); isNew {
if station, isNew := ap.AddClientIfNew(bssid, freq, rssi, mod.Session.Lan.Aliases()); isNew {
mod.Session.Events.Add("wifi.client.new", ClientEvent{
AP: ap,
Client: station,

View file

@ -36,7 +36,7 @@ func (mod *WiFiModule) discoverHandshakes(radiotap *layers.RadioTap, dot11 *laye
staIsUs := bytes.Equal(staMac, mod.iface.HW)
station, found := ap.Get(staMac.String())
if !found {
station, _ = ap.AddClientIfNew(staMac.String(), ap.Frequency, ap.RSSI)
station, _ = ap.AddClientIfNew(staMac.String(), ap.Frequency, ap.RSSI, mod.Session.Lan.Aliases())
}
rawPMKID := []byte(nil)