mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 21:43:18 -07:00
misc: refactored modules.findMAC to session.FindMAC
This commit is contained in:
parent
81f1d6b88f
commit
31895569f7
4 changed files with 36 additions and 50 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue