new: new ble.show.filter, ble.show.limit and ble.show.sort parameters

This commit is contained in:
evilsocket 2019-02-14 10:40:45 +01:00
commit d62090267e
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
3 changed files with 112 additions and 13 deletions

View file

@ -10,6 +10,7 @@ import (
golog "log"
"time"
"github.com/bettercap/bettercap/modules/utils"
"github.com/bettercap/bettercap/network"
"github.com/bettercap/bettercap/session"
@ -26,6 +27,7 @@ type BLERecon struct {
connTimeout time.Duration
quit chan bool
done chan bool
selector *utils.ViewSelector
}
func NewBLERecon(s *session.Session) *BLERecon {
@ -39,6 +41,10 @@ func NewBLERecon(s *session.Session) *BLERecon {
connected: false,
}
mod.selector = utils.ViewSelectorFor(&mod.SessionModule,
"ble.show",
[]string{"rssi", "mac", "seen"}, "rssi asc")
mod.AddHandler(session.NewModuleHandler("ble.recon on", "",
"Start Bluetooth Low Energy devices discovery.",
func(args []string) error {