mirror of
https://github.com/bettercap/bettercap
synced 2025-08-21 05:53:20 -07:00
misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
a79ed9b4d4
commit
ff3add0fe2
3 changed files with 9 additions and 6 deletions
|
@ -65,9 +65,12 @@ func (s *Station) IsOpen() bool {
|
|||
}
|
||||
|
||||
func (s *Station) PathFriendlyName() string {
|
||||
name := strings.Replace(s.HwAddress, ":", "", -1)
|
||||
name := ""
|
||||
bssid := strings.Replace(s.HwAddress, ":", "", -1)
|
||||
if essid := pathNameCleaner.ReplaceAllString(s.Hostname, ""); essid != "" {
|
||||
name = fmt.Sprintf("%s_%s", name, essid)
|
||||
name = fmt.Sprintf("%s_%s", essid, bssid)
|
||||
} else {
|
||||
name = bssid
|
||||
}
|
||||
return name
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue