mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
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:
parent
c304ca4696
commit
54607993ba
4 changed files with 75 additions and 42 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue