mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 05:23:19 -07:00
fix: pruning wifi stations after a certain time of inactivity
This commit is contained in:
parent
ee2e66a20a
commit
8d2f0af82b
3 changed files with 69 additions and 20 deletions
|
@ -377,7 +377,13 @@ func (s *Session) Start() error {
|
|||
}
|
||||
|
||||
s.Firewall = firewall.Make(s.Interface)
|
||||
s.WiFi = network.NewWiFi(s.Interface)
|
||||
|
||||
s.WiFi = network.NewWiFi(s.Interface, func(st *network.WiFiStation) {
|
||||
s.Events.Add("wifi.station.new", st)
|
||||
}, func(st *network.WiFiStation) {
|
||||
s.Events.Add("wifi.station.lost", st)
|
||||
})
|
||||
|
||||
s.Lan = network.NewLAN(s.Interface, s.Gateway, func(e *network.Endpoint) {
|
||||
s.Events.Add("endpoint.new", e)
|
||||
}, func(e *network.Endpoint) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue