From b6e9ca59ec0965df88774329378b521e849728a0 Mon Sep 17 00:00:00 2001 From: evilsocket Date: Wed, 20 Feb 2019 18:54:19 +0100 Subject: [PATCH] misc: small fix or general refactoring i did not bother commenting --- modules/hid/hid_recon.go | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/modules/hid/hid_recon.go b/modules/hid/hid_recon.go index a40dbb4d..c8623712 100644 --- a/modules/hid/hid_recon.go +++ b/modules/hid/hid_recon.go @@ -73,18 +73,15 @@ func NewHIDRecon(s *session.Session) *HIDRecon { "true", "If true, enable the LNA power amplifier for CrazyRadio devices.")) - /* - pretty useless until i don't implement the microsoft specific keylogger - sniff := session.NewModuleHandler("hid.sniff ADDRESS", `(?i)^hid\.sniff ([a-f0-9]{2}:[a-f0-9]{2}:[a-f0-9]{2}:[a-f0-9]{2}:[a-f0-9]{2}|clear)$`, - "TODO TODO", - func(args []string) error { - return mod.setSniffMode(args[0]) - }) + sniff := session.NewModuleHandler("hid.sniff ADDRESS", `(?i)^hid\.sniff ([a-f0-9]{2}:[a-f0-9]{2}:[a-f0-9]{2}:[a-f0-9]{2}:[a-f0-9]{2}|clear)$`, + "Start sniffing a specific ADDRESS in order to collect payloads, use 'clear' to stop collecting.", + func(args []string) error { + return mod.setSniffMode(args[0]) + }) - sniff.Complete("hid.sniff", s.HIDCompleter) + sniff.Complete("hid.sniff", s.HIDCompleter) - mod.AddHandler(sniff) - */ + mod.AddHandler(sniff) mod.AddHandler(session.NewModuleHandler("hid.show", "", "Show a list of detected HID devices on the 2.4Ghz spectrum.",