mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -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
|
@ -60,7 +60,7 @@ func (p *Prober) sendProbe(from net.IP, from_hw net.HardwareAddr, ip net.IP) {
|
|||
|
||||
wg.Add(1)
|
||||
go func(w *sync.WaitGroup) {
|
||||
p.sendProbeUDP(from, from_hw, ip)
|
||||
p.sendProbeNBNS(from, from_hw, ip)
|
||||
w.Done()
|
||||
}(&wg)
|
||||
|
||||
|
@ -110,6 +110,9 @@ func (p *Prober) Start() error {
|
|||
} else if p.Session.Skip(ip) {
|
||||
log.Debug("Skipping address %s from UDP probing.", ip)
|
||||
continue
|
||||
} else if p.Session.Lan.GetByIp(ip.String()) != nil {
|
||||
log.Debug("Skipping address %s from UDP probing (already in the arp cache).", ip)
|
||||
continue
|
||||
}
|
||||
|
||||
p.sendProbe(from, from_hw, ip)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue