misc: refactored modules.findMAC to session.FindMAC

This commit is contained in:
evilsocket 2019-01-18 20:13:41 +01:00
commit 31895569f7
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
4 changed files with 36 additions and 50 deletions

View file

@ -162,7 +162,7 @@ func (p *ArpSpoofer) unSpoof() error {
neighbours := list.Expand()
for _, address := range neighbours {
if !p.Session.Skip(address) {
if realMAC, err := findMAC(p.Session, address, false); err == nil {
if realMAC, err := p.Session.FindMAC(address, false); err == nil {
p.sendArp(address, realMAC, false, false)
}
}
@ -209,7 +209,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)
hw, err := p.Session.FindMAC(ip, probe)
if err != nil {
log.Debug("Could not find hardware address for %s, retrying in one second.", ip.String())
continue