From 3e8d6512e1eaa08a1331c12d2ba3d80a0ad4b87c Mon Sep 17 00:00:00 2001 From: evilsocket Date: Tue, 19 Mar 2019 13:55:23 +0100 Subject: [PATCH] fix: using fallback hid.device.type if the device was detected but not its type --- modules/hid/hid_inject.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/hid/hid_inject.go b/modules/hid/hid_inject.go index f5e10c3a..fbf90ddc 100644 --- a/modules/hid/hid_inject.go +++ b/modules/hid/hid_inject.go @@ -55,13 +55,10 @@ func (mod *HIDRecon) prepInjection() (error, *network.HIDDevice, []*Command) { } var builder FrameBuilder - if found { + if found && dev.Type != network.HIDTypeUnknown { // get the device specific protocol handler builder, found = FrameBuilders[dev.Type] if found == false { - if dev.Type == network.HIDTypeUnknown { - return errNoType(mod.sniffAddr), nil, nil - } return errNotSupported(dev), nil, nil } } else {