mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -07:00
new: hid.sniff will now hexdump sniffed payloads (closes #490)
This commit is contained in:
parent
73710ba7d3
commit
ee8fe972e0
4 changed files with 23 additions and 7 deletions
|
@ -42,11 +42,13 @@ func (mod *HIDRecon) onDeviceDetected(buf []byte) {
|
|||
if isNew, dev := mod.Session.HID.AddIfNew(addr, mod.channel, payload); isNew {
|
||||
// sniff for a while in order to detect the device type
|
||||
go func() {
|
||||
if err := mod.setSniffMode(dev.Address); err == nil {
|
||||
prevSilent := mod.sniffSilent
|
||||
|
||||
if err := mod.setSniffMode(dev.Address, true); err == nil {
|
||||
mod.Debug("detecting device type ...")
|
||||
defer func() {
|
||||
mod.sniffLock.Unlock()
|
||||
mod.setSniffMode("clear")
|
||||
mod.setSniffMode("clear", prevSilent)
|
||||
}()
|
||||
// make sure nobody can sniff to another
|
||||
// address until we're not done here...
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue