mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 21:43:18 -07:00
new: implemented ble.timeout and ble.ttl parameters (ref #560)
This commit is contained in:
parent
4cba4f9ff2
commit
8ec91c9206
2 changed files with 23 additions and 6 deletions
|
@ -15,8 +15,7 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
bleAliveInterval = time.Duration(5) * time.Second
|
||||
blePresentInterval = time.Duration(30) * time.Second
|
||||
bleAliveInterval = time.Duration(5) * time.Second
|
||||
)
|
||||
|
||||
func (mod *BLERecon) getRow(dev *network.BLEDevice, withName bool) []string {
|
||||
|
@ -27,6 +26,7 @@ func (mod *BLERecon) getRow(dev *network.BLEDevice, withName bool) []string {
|
|||
sinceSeen := time.Since(dev.LastSeen)
|
||||
lastSeen := dev.LastSeen.Format("15:04:05")
|
||||
|
||||
blePresentInterval := time.Duration(mod.devTTL) * time.Second
|
||||
if sinceSeen <= bleAliveInterval {
|
||||
lastSeen = tui.Bold(lastSeen)
|
||||
} else if sinceSeen > blePresentInterval {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue