diff --git a/modules/hid/hid.go b/modules/hid/hid.go index 7bf8f8da..8e62caf8 100644 --- a/modules/hid/hid.go +++ b/modules/hid/hid.go @@ -1,3 +1,6 @@ +// +build !windows +// +build !android + package hid import ( diff --git a/modules/hid/hid_recon.go b/modules/hid/hid_recon.go index 351b9be0..9ca141f2 100644 --- a/modules/hid/hid_recon.go +++ b/modules/hid/hid_recon.go @@ -1,3 +1,6 @@ +// +build !windows +// +build !android + package hid import ( diff --git a/modules/hid/hid_sniff.go b/modules/hid/hid_sniff.go index a5abf5d0..844e4da6 100644 --- a/modules/hid/hid_sniff.go +++ b/modules/hid/hid_sniff.go @@ -1,3 +1,6 @@ +// +build !windows +// +build !android + package hid import ( diff --git a/modules/hid/hid_unsupported.go b/modules/hid/hid_unsupported.go new file mode 100644 index 00000000..3c7e1dca --- /dev/null +++ b/modules/hid/hid_unsupported.go @@ -0,0 +1,55 @@ +// +build windows android + +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 +}