mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 13:33:21 -07:00
new: aliases are now centralized and can be used for any type of device (closes #504)
This commit is contained in:
parent
96853e663b
commit
7e7f2ef645
11 changed files with 115 additions and 51 deletions
|
@ -27,6 +27,7 @@ type BLEService struct {
|
|||
}
|
||||
|
||||
type BLEDevice struct {
|
||||
Alias string
|
||||
LastSeen time.Time
|
||||
DeviceName string
|
||||
Vendor string
|
||||
|
@ -40,6 +41,7 @@ type bleDeviceJSON struct {
|
|||
LastSeen time.Time `json:"last_seen"`
|
||||
Name string `json:"name"`
|
||||
MAC string `json:"mac"`
|
||||
Alias string `json:"alias"`
|
||||
Vendor string `json:"vendor"`
|
||||
RSSI int `json:"rssi"`
|
||||
Connectable bool `json:"connectable"`
|
||||
|
@ -81,6 +83,7 @@ func (d *BLEDevice) MarshalJSON() ([]byte, error) {
|
|||
LastSeen: d.LastSeen,
|
||||
Name: d.Name(),
|
||||
MAC: d.Device.ID(),
|
||||
Alias: d.Alias,
|
||||
Vendor: d.Vendor,
|
||||
RSSI: d.RSSI,
|
||||
Connectable: d.Advertisement.Connectable,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue