mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -07:00
new: new hid.ttl parameter (fixes #560)
This commit is contained in:
parent
8ec91c9206
commit
f14470c8f6
2 changed files with 12 additions and 3 deletions
|
@ -68,13 +68,12 @@ func (mod *HIDRecon) onDeviceDetected(buf []byte) {
|
|||
}
|
||||
}
|
||||
|
||||
var maxDeviceTTL = 20 * time.Minute
|
||||
|
||||
func (mod *HIDRecon) devPruner() {
|
||||
mod.waitGroup.Add(1)
|
||||
defer mod.waitGroup.Done()
|
||||
|
||||
mod.Debug("devices pruner started.")
|
||||
maxDeviceTTL := time.Duration(mod.devTTL) * time.Second
|
||||
mod.Debug("devices pruner started with ttl %v", maxDeviceTTL)
|
||||
for mod.Running() {
|
||||
for _, dev := range mod.Session.HID.Devices() {
|
||||
sinceLastSeen := time.Since(dev.LastSeen)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue