diff --git a/modules/hid/build_amazon.go b/modules/hid/build_amazon.go index bd787e62..eb65da7c 100644 --- a/modules/hid/build_amazon.go +++ b/modules/hid/build_amazon.go @@ -1,3 +1,5 @@ +// +build !windows + package hid import ( diff --git a/modules/hid/build_logitech.go b/modules/hid/build_logitech.go index 1beb2ade..90889d78 100644 --- a/modules/hid/build_logitech.go +++ b/modules/hid/build_logitech.go @@ -1,3 +1,5 @@ +// +build !windows + package hid import ( diff --git a/modules/hid/build_microsoft.go b/modules/hid/build_microsoft.go index b85f7271..046e1d06 100644 --- a/modules/hid/build_microsoft.go +++ b/modules/hid/build_microsoft.go @@ -1,3 +1,5 @@ +// +build !windows + package hid import ( diff --git a/modules/hid/builders.go b/modules/hid/builders.go index 826a1249..4b2f9edf 100644 --- a/modules/hid/builders.go +++ b/modules/hid/builders.go @@ -1,3 +1,5 @@ +// +build !windows + package hid import ( diff --git a/modules/hid/command.go b/modules/hid/command.go index 17799ea6..a2671875 100644 --- a/modules/hid/command.go +++ b/modules/hid/command.go @@ -1,3 +1,5 @@ +// +build !windows + package hid import ( diff --git a/modules/hid/duckyparser.go b/modules/hid/duckyparser.go index 021962b8..25c95065 100644 --- a/modules/hid/duckyparser.go +++ b/modules/hid/duckyparser.go @@ -1,3 +1,5 @@ +// +build !windows + package hid import ( diff --git a/modules/hid/hid.go b/modules/hid/hid.go index f36fa56f..0262bb90 100644 --- a/modules/hid/hid.go +++ b/modules/hid/hid.go @@ -1,3 +1,5 @@ +// +build !windows + package hid import ( diff --git a/modules/hid/hid_inject.go b/modules/hid/hid_inject.go index c96a3d60..4a0c2ca9 100644 --- a/modules/hid/hid_inject.go +++ b/modules/hid/hid_inject.go @@ -1,3 +1,5 @@ +// +build !windows + package hid import ( diff --git a/modules/hid/hid_recon.go b/modules/hid/hid_recon.go index 351b9be0..1d081903 100644 --- a/modules/hid/hid_recon.go +++ b/modules/hid/hid_recon.go @@ -1,3 +1,5 @@ +// +build !windows + package hid import ( diff --git a/modules/hid/hid_show.go b/modules/hid/hid_show.go index 3418cbb4..5f58c19b 100644 --- a/modules/hid/hid_show.go +++ b/modules/hid/hid_show.go @@ -1,3 +1,5 @@ +// +build !windows + package hid import ( diff --git a/modules/hid/hid_show_sort.go b/modules/hid/hid_show_sort.go index a70690e6..c21c959d 100644 --- a/modules/hid/hid_show_sort.go +++ b/modules/hid/hid_show_sort.go @@ -1,3 +1,5 @@ +// +build !windows + package hid import ( diff --git a/modules/hid/hid_sniff.go b/modules/hid/hid_sniff.go index a5abf5d0..bc77886e 100644 --- a/modules/hid/hid_sniff.go +++ b/modules/hid/hid_sniff.go @@ -1,3 +1,5 @@ +// +build !windows + package hid import ( diff --git a/modules/hid/hid_unsupported.go b/modules/hid/hid_unsupported.go new file mode 100644 index 00000000..372efed9 --- /dev/null +++ b/modules/hid/hid_unsupported.go @@ -0,0 +1,55 @@ +// +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 40f76016..5cb3fd82 100644 --- a/modules/hid/keymaps.go +++ b/modules/hid/keymaps.go @@ -1,3 +1,5 @@ +// +build !windows + package hid import (