fix: using fallback hid.device.type if the device was detected but not its type

This commit is contained in:
evilsocket 2019-03-19 13:55:23 +01:00
parent af1bfb3894
commit 3e8d6512e1
No known key found for this signature in database
GPG key ID: 1564D7F30393A456

View file

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