new: hid.sniff will now hexdump sniffed payloads (closes #490)

This commit is contained in:
evilsocket 2019-03-14 18:33:26 +01:00
commit ee8fe972e0
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
4 changed files with 23 additions and 7 deletions

View file

@ -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...