new: added number of captured full handshakes in wifi.show

This commit is contained in:
evilsocket 2019-02-05 19:56:21 +01:00
commit a90f63b643
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
3 changed files with 50 additions and 12 deletions

View file

@ -182,6 +182,22 @@ func (w *WiFi) Clear() error {
return nil
}
func (w *WiFi) NumHandshakes() int {
w.Lock()
defer w.Unlock()
sum := 0
for _, ap := range w.aps {
for _, station := range ap.Clients() {
if station.Handshake.Complete() {
sum++
}
}
}
return sum
}
func (w *WiFi) SaveHandshakesTo(fileName string, linkType layers.LinkType) error {
w.Lock()
defer w.Unlock()