mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
fix: pruning wifi clients not seen in the last 5 minutes
This commit is contained in:
parent
81fb3fe1a6
commit
db30cfdd6a
2 changed files with 24 additions and 4 deletions
|
@ -49,6 +49,16 @@ func (ap *AccessPoint) Get(bssid string) (*Station, bool) {
|
|||
return nil, false
|
||||
}
|
||||
|
||||
func (ap *AccessPoint) RemoveClient(mac string) {
|
||||
ap.Lock()
|
||||
defer ap.Unlock()
|
||||
|
||||
bssid := NormalizeMac(mac)
|
||||
if _, found := ap.clients[bssid]; found {
|
||||
delete(ap.clients, bssid)
|
||||
}
|
||||
}
|
||||
|
||||
func (ap *AccessPoint) AddClient(bssid string, frequency int, rssi int8) *Station {
|
||||
ap.Lock()
|
||||
defer ap.Unlock()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue