new: hid.inject now supports non visible devices (talking directly to the dongle) via the hid.force.type parameter

This commit is contained in:
evilsocket 2019-03-09 11:16:18 +01:00
commit d8d208ae17
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
4 changed files with 58 additions and 10 deletions

View file

@ -36,6 +36,10 @@ func (b MicrosoftBuilder) frameFor(template []byte, cmd *Command) []byte {
}
func (b MicrosoftBuilder) BuildFrames(dev *network.HIDDevice, commands []*Command) error {
if dev == nil {
return fmt.Errorf("the microsoft frame injection requires the device to be visible")
}
tpl := ([]byte)(nil)
dev.EachPayload(func(p []byte) bool {
if len(p) == 19 {