fix: using active udp probes if arp.spoof fails to resolve an IP to its MAC

This commit is contained in:
evilsocket 2018-03-27 10:39:20 +02:00
commit da2d837dfb
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
2 changed files with 22928 additions and 22929 deletions

View file

@ -120,7 +120,7 @@ func (p *ArpSpoofer) Start() error {
defer p.waitGroup.Done()
for p.Running() {
p.sendArp(from, from_hw, true, false)
p.sendArp(from, from_hw, true, true)
time.Sleep(1 * time.Second)
}
})
@ -166,7 +166,7 @@ func (p *ArpSpoofer) sendArp(saddr net.IP, smac net.HardwareAddr, check_running
// do we have this ip mac address?
hw, err := findMAC(p.Session, ip, probe)
if err != nil {
log.Debug("Error while looking up hardware address for %s: %s", ip.String(), err)
log.Warning("Could not find hardware address for %s, retrying in one second.", ip.String())
continue
}
@ -176,7 +176,7 @@ func (p *ArpSpoofer) sendArp(saddr net.IP, smac net.HardwareAddr, check_running
for _, hw := range p.macs {
ip, err := network.ArpInverseLookup(p.Session.Interface.Name(), hw.String(), false)
if err != nil {
log.Debug("Error while looking up ip address for %s: %s", hw.String(), err)
log.Warning("Could not find IP address for %s, retrying in one second.", hw.String())
continue
}

File diff suppressed because it is too large Load diff