new: net.probe on uses both NBNS and MDNS queries to fetch endpoints metadata and hostnames

This commit is contained in:
evilsocket 2018-09-09 12:35:00 +03:00
commit e2cc4574c4
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
8 changed files with 127 additions and 106 deletions

View file

@ -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)