new: all hid periods are now configurable by dedicated parameters

This commit is contained in:
evilsocket 2019-02-21 11:23:09 +01:00
commit f6649aa82b
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
3 changed files with 198 additions and 156 deletions

View file

@ -1,6 +1,7 @@
package hid
import (
"fmt"
"time"
"github.com/bettercap/bettercap/network"
@ -14,6 +15,10 @@ func (mod *HIDRecon) isSniffing() bool {
}
func (mod *HIDRecon) setSniffMode(mode string) error {
if !mod.Running() {
return fmt.Errorf("please turn hid.recon on")
}
mod.sniffLock.Lock()
defer mod.sniffLock.Unlock()