mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -07:00
new: added number of captured full handshakes in wifi.show
This commit is contained in:
parent
a6cfb2413f
commit
a90f63b643
3 changed files with 50 additions and 12 deletions
|
@ -97,15 +97,21 @@ func (ap *AccessPoint) Clients() (list []*Station) {
|
|||
return
|
||||
}
|
||||
|
||||
func (ap *AccessPoint) HasHandshakes() bool {
|
||||
func (ap *AccessPoint) NumHandshakes() int {
|
||||
ap.Lock()
|
||||
defer ap.Unlock()
|
||||
|
||||
sum := 0
|
||||
|
||||
for _, c := range ap.clients {
|
||||
if c.Handshake.Complete() {
|
||||
return true
|
||||
sum++
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
return sum
|
||||
}
|
||||
|
||||
func (ap *AccessPoint) HasHandshakes() bool {
|
||||
return ap.NumHandshakes() > 0
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue