mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 10:46:57 -07:00
fix: added a mutex to write ops in the hid module
This commit is contained in:
parent
e0e1f4e6df
commit
d21f3b447a
4 changed files with 11 additions and 0 deletions
|
@ -40,6 +40,9 @@ func (mod *HIDRecon) setSniffMode(mode string) error {
|
|||
}
|
||||
|
||||
func (mod *HIDRecon) doPing() {
|
||||
mod.writeLock.Lock()
|
||||
defer mod.writeLock.Unlock()
|
||||
|
||||
if mod.inSniffMode == false {
|
||||
if err := mod.dongle.EnterSnifferModeFor(mod.sniffAddrRaw); err != nil {
|
||||
mod.Error("error entering sniffer mode for %s: %v", mod.sniffAddr, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue