mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 13:33:21 -07:00
fix: keeping red-mark for APs with captured key material even when stations disconnect (fixes #449)
This commit is contained in:
parent
2cdd3d22a5
commit
38c761afa8
4 changed files with 123 additions and 95 deletions
|
@ -10,7 +10,8 @@ type AccessPoint struct {
|
|||
*Station
|
||||
sync.Mutex
|
||||
|
||||
clients map[string]*Station
|
||||
clients map[string]*Station
|
||||
withKeyMaterial bool
|
||||
}
|
||||
|
||||
type apJSON struct {
|
||||
|
@ -106,6 +107,20 @@ func (ap *AccessPoint) EachClient(cb func(mac string, station *Station)) {
|
|||
}
|
||||
}
|
||||
|
||||
func (ap *AccessPoint) WithKeyMaterial(state bool) {
|
||||
ap.Lock()
|
||||
defer ap.Unlock()
|
||||
|
||||
ap.withKeyMaterial = state
|
||||
}
|
||||
|
||||
func (ap *AccessPoint) HasKeyMaterial() bool {
|
||||
ap.Lock()
|
||||
defer ap.Unlock()
|
||||
|
||||
return ap.withKeyMaterial
|
||||
}
|
||||
|
||||
func (ap *AccessPoint) NumHandshakes() int {
|
||||
ap.Lock()
|
||||
defer ap.Unlock()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue