mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 04:59:25 -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
|
package modules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"errors"
|
||||||
|
|
||||||
"github.com/bettercap/bettercap/session"
|
"github.com/bettercap/bettercap/session"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
notSupported = errors.New("ble.recon is not supported on this OS")
|
||||||
|
)
|
||||||
|
|
||||||
type BLERecon struct {
|
type BLERecon struct {
|
||||||
session.SessionModule
|
session.SessionModule
|
||||||
}
|
}
|
||||||
|
@ -31,13 +35,13 @@ func NewBLERecon(s *session.Session) *BLERecon {
|
||||||
d.AddHandler(session.NewModuleHandler("ble.recon on", "",
|
d.AddHandler(session.NewModuleHandler("ble.recon on", "",
|
||||||
"Start Bluetooth Low Energy devices discovery.",
|
"Start Bluetooth Low Energy devices discovery.",
|
||||||
func(args []string) error {
|
func(args []string) error {
|
||||||
return fmt.Errorf("ble.recon is not supported on Windows")
|
return notSupported
|
||||||
}))
|
}))
|
||||||
|
|
||||||
d.AddHandler(session.NewModuleHandler("ble.recon off", "",
|
d.AddHandler(session.NewModuleHandler("ble.recon off", "",
|
||||||
"Stop Bluetooth Low Energy devices discovery.",
|
"Stop Bluetooth Low Energy devices discovery.",
|
||||||
func(args []string) error {
|
func(args []string) error {
|
||||||
return fmt.Errorf("ble.recon is not supported on Windows")
|
return notSupported
|
||||||
}))
|
}))
|
||||||
|
|
||||||
return d
|
return d
|
||||||
|
@ -56,13 +60,13 @@ func (d BLERecon) Author() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *BLERecon) Configure() (err error) {
|
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 {
|
func (d *BLERecon) Start() error {
|
||||||
return fmt.Errorf("ble.recon is not supported on Windows and macOS")
|
return notSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *BLERecon) Stop() error {
|
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