mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -07:00
fix: fixed a bug which prevented 'set alias MAC ""' to clear an alias
This commit is contained in:
parent
5aa57f5cd7
commit
4f54b12ee1
1 changed files with 3 additions and 0 deletions
|
@ -274,6 +274,9 @@ func (s *Session) shHandler(args []string, sess *Session) error {
|
||||||
func (s *Session) aliasHandler(args []string, sess *Session) error {
|
func (s *Session) aliasHandler(args []string, sess *Session) error {
|
||||||
mac := args[0]
|
mac := args[0]
|
||||||
alias := str.Trim(args[1])
|
alias := str.Trim(args[1])
|
||||||
|
if alias == "\"\"" || alias == "''" {
|
||||||
|
alias = ""
|
||||||
|
}
|
||||||
s.Lan.SetAliasFor(mac, alias)
|
s.Lan.SetAliasFor(mac, alias)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue