mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -07:00
fix: fixed a bug of the probe and recon algos which prevented targets from being removed once offline
This commit is contained in:
parent
fa2ada828b
commit
73f887087a
4 changed files with 12 additions and 32 deletions
12
net/arp.go
12
net/arp.go
|
@ -13,18 +13,6 @@ var (
|
|||
arpTable = make(ArpTable)
|
||||
)
|
||||
|
||||
func ArpDiff(current, before ArpTable) ArpTable {
|
||||
diff := make(ArpTable)
|
||||
for ip, mac := range current {
|
||||
_, found := before[ip]
|
||||
if !found {
|
||||
diff[ip] = mac
|
||||
}
|
||||
}
|
||||
|
||||
return diff
|
||||
}
|
||||
|
||||
func ArpLookup(iface string, address string, refresh bool) (string, error) {
|
||||
// Refresh ARP table if first run or if a force refresh has been instructed.
|
||||
if ArpParsed() == false || refresh == true {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue