diff --git a/modules/wifi/wifi_recon_handshakes.go b/modules/wifi/wifi_recon_handshakes.go index a5e2fc96..cdf1a302 100644 --- a/modules/wifi/wifi_recon_handshakes.go +++ b/modules/wifi/wifi_recon_handshakes.go @@ -119,6 +119,7 @@ func (mod *WiFiModule) discoverHandshakes(radiotap *layers.RadioTap, dot11 *laye // make sure the info that we have key material for this AP // is persisted even after stations are pruned due to inactivity ap.WithKeyMaterial(true) + ap.ShakeFile(shakesFileName) } // if we added ourselves as a client station but we didn't get any // PMKID, just remove it from the list of clients of this AP. diff --git a/network/wifi_ap.go b/network/wifi_ap.go index 58143cc0..846cb216 100644 --- a/network/wifi_ap.go +++ b/network/wifi_ap.go @@ -15,12 +15,14 @@ type AccessPoint struct { aliases *data.UnsortedKV clients map[string]*Station withKeyMaterial bool + shakeFile string } type apJSON struct { *Station Clients []*Station `json:"clients"` Handshake bool `json:"handshake"` + shakeFile string `json:"shakefile"` } func NewAccessPoint(essid, bssid string, frequency int, rssi int8, aliases *data.UnsortedKV) *AccessPoint { @@ -39,6 +41,7 @@ func (ap *AccessPoint) MarshalJSON() ([]byte, error) { Station: ap.Station, Clients: make([]*Station, 0), Handshake: ap.withKeyMaterial, + shakeFile: ap.shakeFile, } for _, c := range ap.clients { @@ -167,3 +170,10 @@ func (ap *AccessPoint) HasPMKID() bool { return false } + +func (ap *AccessPoint) ShakeFile(filename string) { + ap.Lock() + defer ap.Unlock() + + ap.shakeFile = filename +} \ No newline at end of file