From a4de63c357f5141a636e3be86017e38157103a74 Mon Sep 17 00:00:00 2001 From: evilsocket Date: Sat, 9 Mar 2019 12:39:30 +0100 Subject: [PATCH] misc: small fix or general refactoring i did not bother commenting --- modules/hid/build_amazon.go | 2 -- modules/hid/build_logitech.go | 2 -- modules/hid/build_microsoft.go | 2 -- modules/hid/builders.go | 2 -- modules/hid/command.go | 2 -- modules/hid/duckyparser.go | 2 -- modules/hid/hid.go | 2 -- modules/hid/hid_inject.go | 2 -- modules/hid/hid_recon.go | 2 -- modules/hid/hid_show.go | 2 -- modules/hid/hid_show_sort.go | 2 -- modules/hid/hid_sniff.go | 2 -- modules/hid/hid_unsupported.go | 55 ---------------------------------- modules/hid/keymaps.go | 2 -- 14 files changed, 81 deletions(-) delete mode 100644 modules/hid/hid_unsupported.go diff --git a/modules/hid/build_amazon.go b/modules/hid/build_amazon.go index eb65da7c..bd787e62 100644 --- a/modules/hid/build_amazon.go +++ b/modules/hid/build_amazon.go @@ -1,5 +1,3 @@ -// +build !windows - package hid import ( diff --git a/modules/hid/build_logitech.go b/modules/hid/build_logitech.go index 90889d78..1beb2ade 100644 --- a/modules/hid/build_logitech.go +++ b/modules/hid/build_logitech.go @@ -1,5 +1,3 @@ -// +build !windows - package hid import ( diff --git a/modules/hid/build_microsoft.go b/modules/hid/build_microsoft.go index 046e1d06..b85f7271 100644 --- a/modules/hid/build_microsoft.go +++ b/modules/hid/build_microsoft.go @@ -1,5 +1,3 @@ -// +build !windows - package hid import ( diff --git a/modules/hid/builders.go b/modules/hid/builders.go index 4b2f9edf..826a1249 100644 --- a/modules/hid/builders.go +++ b/modules/hid/builders.go @@ -1,5 +1,3 @@ -// +build !windows - package hid import ( diff --git a/modules/hid/command.go b/modules/hid/command.go index a2671875..17799ea6 100644 --- a/modules/hid/command.go +++ b/modules/hid/command.go @@ -1,5 +1,3 @@ -// +build !windows - package hid import ( diff --git a/modules/hid/duckyparser.go b/modules/hid/duckyparser.go index 25c95065..021962b8 100644 --- a/modules/hid/duckyparser.go +++ b/modules/hid/duckyparser.go @@ -1,5 +1,3 @@ -// +build !windows - package hid import ( diff --git a/modules/hid/hid.go b/modules/hid/hid.go index 0262bb90..f36fa56f 100644 --- a/modules/hid/hid.go +++ b/modules/hid/hid.go @@ -1,5 +1,3 @@ -// +build !windows - package hid import ( diff --git a/modules/hid/hid_inject.go b/modules/hid/hid_inject.go index 4a0c2ca9..c96a3d60 100644 --- a/modules/hid/hid_inject.go +++ b/modules/hid/hid_inject.go @@ -1,5 +1,3 @@ -// +build !windows - package hid import ( diff --git a/modules/hid/hid_recon.go b/modules/hid/hid_recon.go index 1d081903..351b9be0 100644 --- a/modules/hid/hid_recon.go +++ b/modules/hid/hid_recon.go @@ -1,5 +1,3 @@ -// +build !windows - package hid import ( diff --git a/modules/hid/hid_show.go b/modules/hid/hid_show.go index 5f58c19b..3418cbb4 100644 --- a/modules/hid/hid_show.go +++ b/modules/hid/hid_show.go @@ -1,5 +1,3 @@ -// +build !windows - package hid import ( diff --git a/modules/hid/hid_show_sort.go b/modules/hid/hid_show_sort.go index c21c959d..a70690e6 100644 --- a/modules/hid/hid_show_sort.go +++ b/modules/hid/hid_show_sort.go @@ -1,5 +1,3 @@ -// +build !windows - package hid import ( diff --git a/modules/hid/hid_sniff.go b/modules/hid/hid_sniff.go index bc77886e..a5abf5d0 100644 --- a/modules/hid/hid_sniff.go +++ b/modules/hid/hid_sniff.go @@ -1,5 +1,3 @@ -// +build !windows - package hid import ( diff --git a/modules/hid/hid_unsupported.go b/modules/hid/hid_unsupported.go deleted file mode 100644 index 372efed9..00000000 --- a/modules/hid/hid_unsupported.go +++ /dev/null @@ -1,55 +0,0 @@ -// +build windows - -package hid - -import ( - "github.com/bettercap/bettercap/session" -) - -type HIDRecon struct { - session.SessionModule -} - -func NewHIDRecon(s *session.Session) *HIDRecon { - mod := &HIDRecon{ - SessionModule: session.NewSessionModule("hid.recon", s), - } - - mod.AddHandler(session.NewModuleHandler("hid.recon on", "", - "Start scanning for HID devices on the 2.4Ghz spectrum.", - func(args []string) error { - return session.ErrNotSupported - })) - - mod.AddHandler(session.NewModuleHandler("hid.recon off", "", - "Stop scanning for HID devices on the 2.4Ghz spectrum.", - func(args []string) error { - return session.ErrNotSupported - })) - - return mod -} - -func (mod HIDRecon) Name() string { - return "hid" -} - -func (mod HIDRecon) Description() string { - return "A scanner and frames injection module for HID devices on the 2.4Ghz spectrum, using Nordic Semiconductor nRF24LU1+ based USB dongles and Bastille Research RFStorm firmware." -} - -func (mod HIDRecon) Author() string { - return "Simone Margaritelli " -} - -func (mod *HIDRecon) Configure() (err error) { - return session.ErrNotSupported -} - -func (mod *HIDRecon) Start() error { - return session.ErrNotSupported -} - -func (mod *HIDRecon) Stop() error { - return session.ErrNotSupported -} diff --git a/modules/hid/keymaps.go b/modules/hid/keymaps.go index 5cb3fd82..40f76016 100644 --- a/modules/hid/keymaps.go +++ b/modules/hid/keymaps.go @@ -1,5 +1,3 @@ -// +build !windows - package hid import (