| 1 |
|
| 2 |
|
| 3 |
package ble |
| 4 |
|
| 5 |
import ( |
| 6 |
"github.com/bettercap/bettercap/session" |
| 7 |
) |
| 8 |
|
| 9 |
type BLERecon struct { |
| 10 |
session.SessionModule |
| 11 |
} |
| 12 |
|
| 13 |
func NewBLERecon(s *session.Session) *BLERecon { |
| 14 |
mod := &BLERecon{ |
| 15 |
SessionModule: session.NewSessionModule("ble.recon", s), |
| 16 |
} |
| 17 |
|
| 18 |
mod.AddHandler(session.NewModuleHandler("ble.recon on", "", |
| 19 |
"Start Bluetooth Low Energy devices discovery.", |
| 20 |
func(args []string) error { |
| 21 |
return session.ErrNotSupported |
| 22 |
})) |
| 23 |
|
| 24 |
mod.AddHandler(session.NewModuleHandler("ble.recon off", "", |
| 25 |
"Stop Bluetooth Low Energy devices discovery.", |
| 26 |
func(args []string) error { |
| 27 |
return session.ErrNotSupported |
| 28 |
})) |
| 29 |
|
| 30 |
return mod |
| 31 |
} |
| 32 |
|
| 33 |
func (mod BLERecon) Name() string { |
| 34 |
return "ble.recon" |
| 35 |
} |
| 36 |
|
| 37 |
func (mod BLERecon) Description() string { |
| 38 |
return "Bluetooth Low Energy devices discovery." |
| 39 |
} |
| 40 |
|
| 41 |
func (mod BLERecon) Author() string { |
| 42 |
return "Simone Margaritelli <[email protected]>" |
| 43 |
} |
| 44 |
|
| 45 |
func (mod *BLERecon) Configure() (err error) { |
| 46 |
return session.ErrNotSupported |
| 47 |
} |
| 48 |
|
| 49 |
func (mod *BLERecon) Start() error { |
| 50 |
return session.ErrNotSupported |
| 51 |
} |
| 52 |
|
| 53 |
func (mod *BLERecon) Stop() error { |
| 54 |
return session.ErrNotSupported |
| 55 |
} |