new: aliases can now be used along with MACs and IP ranges for the arp.spoof.targets variable (ref #204)

This commit is contained in:
evilsocket 2018-03-26 11:38:22 +02:00
commit 54607993ba
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
4 changed files with 75 additions and 42 deletions

View file

@ -83,3 +83,16 @@ func (a *Aliases) Set(mac, alias string) error {
return a.saveUnlocked()
}
func (a *Aliases) Find(alias string) (mac string, found bool) {
a.Lock()
defer a.Unlock()
for m, a := range a.data {
if alias == a {
return m, true
}
}
return "", false
}