added HID support for Microsoft devices

This commit is contained in:
evilsocket 2019-02-20 18:45:13 +01:00
commit 7c9e2afdcc
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
6 changed files with 97 additions and 8 deletions

View file

@ -1,5 +1,9 @@
package hid
import (
"github.com/bettercap/bettercap/network"
)
const (
amzFrameDelay = 5
)
@ -14,7 +18,7 @@ func (b AmazonBuilder) frameFor(cmd *Command) []byte {
0x0f, 0, cmd.Mode, 0, cmd.HID, 0}
}
func (b AmazonBuilder) BuildFrames(commands []*Command) error {
func (b AmazonBuilder) BuildFrames(dev *network.HIDDevice, commands []*Command) error {
for i, cmd := range commands {
if i == 0 {
for j := 0; j < 5; j++ {