mirror of
https://github.com/bettercap/bettercap
synced 2025-07-14 00:53:46 -07:00
new: implemented ble.recon (ref #74)
This commit is contained in:
parent
536614068c
commit
7fe6cd232c
10 changed files with 443 additions and 2 deletions
13
modules/ble_recon_sort.go
Normal file
13
modules/ble_recon_sort.go
Normal file
|
@ -0,0 +1,13 @@
|
|||
package modules
|
||||
|
||||
import (
|
||||
"github.com/bettercap/bettercap/network"
|
||||
)
|
||||
|
||||
type ByBLERSSISorter []*network.BLEDevice
|
||||
|
||||
func (a ByBLERSSISorter) Len() int { return len(a) }
|
||||
func (a ByBLERSSISorter) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
|
||||
func (a ByBLERSSISorter) Less(i, j int) bool {
|
||||
return a[i].RSSI > a[j].RSSI
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue