mirror of
https://github.com/bettercap/bettercap
synced 2025-07-16 10:03:39 -07:00
new: net.probe on uses both NBNS and MDNS queries to fetch endpoints metadata and hostnames
This commit is contained in:
parent
36999813c4
commit
e2cc4574c4
8 changed files with 127 additions and 106 deletions
|
@ -94,14 +94,12 @@ func (s *Session) startNetMon() {
|
|||
existing, _ = s.Lan.Get(mac)
|
||||
}
|
||||
|
||||
if existing != nil {
|
||||
if existing.Hostname == "" && event.Hostname != "" {
|
||||
existing.Hostname = event.Hostname
|
||||
}
|
||||
if event.Meta != nil {
|
||||
for k, v := range event.Meta {
|
||||
existing.Meta.Set(k, v)
|
||||
if existing != nil && event.Meta != nil {
|
||||
for k, v := range event.Meta {
|
||||
if strings.HasSuffix(k, ":hostname") && existing.Hostname == "" {
|
||||
existing.Hostname = v
|
||||
}
|
||||
existing.Meta.Set(k, v)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue