mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
5ef8defce6
commit
c92d1ffbe7
1 changed files with 10 additions and 6 deletions
|
@ -3,11 +3,15 @@
|
|||
package modules
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"errors"
|
||||
|
||||
"github.com/bettercap/bettercap/session"
|
||||
)
|
||||
|
||||
var (
|
||||
notSupported = errors.New("ble.recon is not supported on this OS")
|
||||
)
|
||||
|
||||
type BLERecon struct {
|
||||
session.SessionModule
|
||||
}
|
||||
|
@ -31,13 +35,13 @@ func NewBLERecon(s *session.Session) *BLERecon {
|
|||
d.AddHandler(session.NewModuleHandler("ble.recon on", "",
|
||||
"Start Bluetooth Low Energy devices discovery.",
|
||||
func(args []string) error {
|
||||
return fmt.Errorf("ble.recon is not supported on Windows")
|
||||
return notSupported
|
||||
}))
|
||||
|
||||
d.AddHandler(session.NewModuleHandler("ble.recon off", "",
|
||||
"Stop Bluetooth Low Energy devices discovery.",
|
||||
func(args []string) error {
|
||||
return fmt.Errorf("ble.recon is not supported on Windows")
|
||||
return notSupported
|
||||
}))
|
||||
|
||||
return d
|
||||
|
@ -56,13 +60,13 @@ func (d BLERecon) Author() string {
|
|||
}
|
||||
|
||||
func (d *BLERecon) Configure() (err error) {
|
||||
return fmt.Errorf("ble.recon is not supported on Windows and macOS")
|
||||
return notSupported
|
||||
}
|
||||
|
||||
func (d *BLERecon) Start() error {
|
||||
return fmt.Errorf("ble.recon is not supported on Windows and macOS")
|
||||
return notSupported
|
||||
}
|
||||
|
||||
func (d *BLERecon) Stop() error {
|
||||
return fmt.Errorf("ble.recon is not supported on Windows and macOS")
|
||||
return notSupported
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue