From 5d7c8933faf0bfb4817c5d8db4b548b6c6d62de0 Mon Sep 17 00:00:00 2001 From: evilsocket Date: Sat, 9 Mar 2019 11:30:28 +0100 Subject: [PATCH] fix: showing warning about hid failed frames only if every attempt failed --- modules/hid/hid_inject.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/hid/hid_inject.go b/modules/hid/hid_inject.go index d8dd1363..1642e5cc 100644 --- a/modules/hid/hid_inject.go +++ b/modules/hid/hid_inject.go @@ -54,7 +54,7 @@ func (mod *HIDRecon) prepInjection() (error, *network.HIDDevice, []*Command) { dev, found := mod.Session.HID.Get(mod.sniffAddr) if found == false { - mod.Warning("device %s is not visible, will use HID type %s", tui.Yellow(mod.sniffType)) + mod.Warning("device %s is not visible, will use HID type %s", mod.sniffAddr, tui.Yellow(mod.sniffType)) } var builder FrameBuilder @@ -130,7 +130,7 @@ func (mod *HIDRecon) doInjection() { for attempt := 0; attempt < 3; attempt++ { if err := mod.dongle.TransmitPayload(frame.Data, 500, 5); err != nil { if attempt < 2 { - mod.Warning("error sending frame #%d of HID command #%d: %v, retrying ...", j, i, err) + mod.Debug("error sending frame #%d of HID command #%d: %v, retrying ...", j, i, err) } else { mod.Error("error sending frame #%d of HID command #%d: %v", j, i, err) }