mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
new: reporting alias and vendor for wifi.client.new and wifi.client.lost events
This commit is contained in:
parent
b450747f4e
commit
621f03c946
2 changed files with 16 additions and 7 deletions
|
@ -149,10 +149,16 @@ func (t *Endpoint) String() string {
|
|||
return t.IpAddress
|
||||
} else if t.Vendor == "" {
|
||||
return fmt.Sprintf("%s%s", ipPart, t.HwAddress)
|
||||
} else if t.Hostname == "" {
|
||||
return fmt.Sprintf("%s%s ( %s )", ipPart, t.HwAddress, t.Vendor)
|
||||
} else if t.Hostname == "" && t.Alias == "" {
|
||||
return fmt.Sprintf("%s%s (%s)", ipPart, t.HwAddress, t.Vendor)
|
||||
}
|
||||
return fmt.Sprintf("%s%s ( %s ) - %s", ipPart, t.HwAddress, t.Vendor, tui.Bold(t.Hostname))
|
||||
|
||||
name := t.Hostname
|
||||
if t.Alias != "" {
|
||||
name = t.Alias
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%s%s (%s) - %s", ipPart, t.HwAddress, t.Vendor, tui.Bold(name))
|
||||
}
|
||||
|
||||
func (t *Endpoint) OnMeta(meta map[string]string) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue