mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
Multiple IPs are now correctly parsed
This commit is contained in:
parent
892eff56a6
commit
a151e63497
1 changed files with 2 additions and 3 deletions
|
@ -153,12 +153,11 @@ func (p *ArpSpoofer) parseTargets(targets string) (err error) {
|
|||
targets = strings.Replace(targets, mac, "", -1)
|
||||
}
|
||||
|
||||
targets = strings.TrimLeft(targets, ", ")
|
||||
targets = strings.TrimRight(targets, ", ")
|
||||
targets = strings.Trim(targets, ", ")
|
||||
|
||||
log.Debug("Parsing IP range %s", targets)
|
||||
if len(p.macs) == 0 || targets != "" {
|
||||
list, err := iprange.Parse(targets)
|
||||
list, err := iprange.ParseList(targets)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error while parsing arp.spoof.targets variable '%s': %s.", targets, err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue