fix: several improvements to the https.proxy module

This commit is contained in:
evilsocket 2018-01-14 19:34:15 +01:00
commit f9f0f3d5b3
9 changed files with 308 additions and 29 deletions

View file

@ -103,7 +103,9 @@ func (p *ArpSpoofer) getMAC(ip net.IP, probe bool) (net.HardwareAddr, error) {
func (p *ArpSpoofer) sendArp(saddr net.IP, smac net.HardwareAddr, check_running bool, probe bool) {
for _, ip := range p.addresses {
if p.shouldSpoof(ip) == false {
if check_running && p.Running() == false {
return
} else if p.shouldSpoof(ip) == false {
log.Debug("Skipping address %s from ARP spoofing.", ip)
continue
}
@ -121,10 +123,6 @@ func (p *ArpSpoofer) sendArp(saddr net.IP, smac net.HardwareAddr, check_running
log.Debug("Sending %d bytes of ARP packet to %s:%s.", len(pkt), ip.String(), hw.String())
p.Session.Queue.Send(pkt)
}
if check_running && p.Running() == false {
return
}
}
}