mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36: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
|
@ -23,6 +23,7 @@ type HIDRecon struct {
|
|||
lastPing time.Time
|
||||
useLNA bool
|
||||
sniffLock *sync.Mutex
|
||||
writeLock *sync.Mutex
|
||||
sniffAddrRaw []byte
|
||||
sniffAddr string
|
||||
pingPayload []byte
|
||||
|
@ -47,6 +48,7 @@ func NewHIDRecon(s *session.Session) *HIDRecon {
|
|||
SessionModule: session.NewSessionModule("hid", s),
|
||||
waitGroup: &sync.WaitGroup{},
|
||||
sniffLock: &sync.Mutex{},
|
||||
writeLock: &sync.Mutex{},
|
||||
hopPeriod: 100 * time.Millisecond,
|
||||
pingPeriod: 100 * time.Millisecond,
|
||||
sniffPeriod: 500 * time.Millisecond,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue