fix: do not start arp.spoof if the list of targets is empty

This commit is contained in:
evilsocket 2019-03-20 21:16:34 +01:00
parent a202f7eaca
commit 0cfe6eebcc
No known key found for this signature in database
GPG key ID: 1564D7F30393A456

View file

@ -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())