mirror of
https://github.com/bettercap/bettercap
synced 2025-07-11 23:57:01 -07:00
fix: do not start arp.spoof if the list of targets is empty
This commit is contained in:
parent
a202f7eaca
commit
0cfe6eebcc
1 changed files with 6 additions and 1 deletions
|
@ -127,9 +127,14 @@ func (mod *ArpSpoofer) Start() error {
|
|||
return err
|
||||
}
|
||||
|
||||
nTargets := len(mod.addresses) + len(mod.macs)
|
||||
if nTargets == 0 {
|
||||
mod.Warning("list of targets is empty, module not starting.")
|
||||
return nil
|
||||
}
|
||||
|
||||
return mod.SetRunning(true, func() {
|
||||
neighbours := []net.IP{}
|
||||
nTargets := len(mod.addresses) + len(mod.macs)
|
||||
|
||||
if mod.internal {
|
||||
list, _ := iprange.ParseList(mod.Session.Interface.CIDR())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue