mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -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
25
network/ble_device.go
Normal file
25
network/ble_device.go
Normal file
|
@ -0,0 +1,25 @@
|
|||
package network
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/bettercap/gatt"
|
||||
)
|
||||
|
||||
type BLEDevice struct {
|
||||
LastSeen time.Time
|
||||
Device gatt.Peripheral
|
||||
Vendor string
|
||||
Advertisement *gatt.Advertisement
|
||||
RSSI int
|
||||
}
|
||||
|
||||
func NewBLEDevice(p gatt.Peripheral, a *gatt.Advertisement, rssi int) *BLEDevice {
|
||||
return &BLEDevice{
|
||||
LastSeen: time.Now(),
|
||||
Device: p,
|
||||
Vendor: OuiLookup(NormalizeMac(p.ID())),
|
||||
Advertisement: a,
|
||||
RSSI: rssi,
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue