mirror of
https://github.com/bettercap/bettercap
synced 2025-07-12 08:07:00 -07:00
misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
e2cc4574c4
commit
eba546bef6
2 changed files with 2 additions and 17 deletions
|
@ -110,9 +110,6 @@ 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)
|
||||
|
|
|
@ -166,30 +166,18 @@ func (q *Queue) TrackError() {
|
|||
|
||||
func (q *Queue) getPacketMeta(pkt gopacket.Packet) map[string]string {
|
||||
meta := make(map[string]string)
|
||||
mdns := MDNSGetMeta(pkt)
|
||||
nbns := NBNSGetMeta(pkt)
|
||||
|
||||
if mdns != nil {
|
||||
if mdns := MDNSGetMeta(pkt); mdns != nil {
|
||||
for k, v := range mdns {
|
||||
meta[k] = v
|
||||
}
|
||||
}
|
||||
|
||||
if nbns != nil {
|
||||
if nbns := NBNSGetMeta(pkt); nbns != nil {
|
||||
for k, v := range nbns {
|
||||
meta[k] = v
|
||||
}
|
||||
}
|
||||
/*
|
||||
// check if the packet is a useful mDNS query response
|
||||
hostname := MDNSGetHostname(pkt)
|
||||
// check if we can get some meta info from mDNS TXT records
|
||||
meta := MDNSGetMeta(pkt)
|
||||
|
||||
if hostname != "" {
|
||||
meta["mdns:hostname"] = hostname
|
||||
}
|
||||
*/
|
||||
|
||||
return meta
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue