new: implemented ble.recon (ref #74)

This commit is contained in:
evilsocket 2018-02-26 18:18:58 +01:00
commit 7fe6cd232c
10 changed files with 443 additions and 2 deletions

25
network/ble_device.go Normal file
View 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,
}
}