mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 21:43:18 -07:00
if block ends with a return statement drop this else and outdent its block
This commit is contained in:
parent
e02e13ab63
commit
2522b89069
1 changed files with 23 additions and 23 deletions
|
@ -83,30 +83,30 @@ func (w *WiFiModule) getRow(station *network.Station) ([]string, bool) {
|
||||||
recvd,
|
recvd,
|
||||||
seen,
|
seen,
|
||||||
}, include
|
}, include
|
||||||
} else {
|
|
||||||
// this is ugly, but necessary in order to have this
|
|
||||||
// method handle both access point and clients
|
|
||||||
// transparently
|
|
||||||
clients := ""
|
|
||||||
if ap, found := w.Session.WiFi.Get(station.HwAddress); found {
|
|
||||||
if ap.NumClients() > 0 {
|
|
||||||
clients = strconv.Itoa(ap.NumClients())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return []string{
|
|
||||||
fmt.Sprintf("%d dBm", station.RSSI),
|
|
||||||
bssid,
|
|
||||||
ssid,
|
|
||||||
/* station.Vendor, */
|
|
||||||
encryption,
|
|
||||||
strconv.Itoa(network.Dot11Freq2Chan(station.Frequency)),
|
|
||||||
clients,
|
|
||||||
sent,
|
|
||||||
recvd,
|
|
||||||
seen,
|
|
||||||
}, include
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// this is ugly, but necessary in order to have this
|
||||||
|
// method handle both access point and clients
|
||||||
|
// transparently
|
||||||
|
clients := ""
|
||||||
|
if ap, found := w.Session.WiFi.Get(station.HwAddress); found {
|
||||||
|
if ap.NumClients() > 0 {
|
||||||
|
clients = strconv.Itoa(ap.NumClients())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return []string{
|
||||||
|
fmt.Sprintf("%d dBm", station.RSSI),
|
||||||
|
bssid,
|
||||||
|
ssid,
|
||||||
|
/* station.Vendor, */
|
||||||
|
encryption,
|
||||||
|
strconv.Itoa(network.Dot11Freq2Chan(station.Frequency)),
|
||||||
|
clients,
|
||||||
|
sent,
|
||||||
|
recvd,
|
||||||
|
seen,
|
||||||
|
}, include
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w *WiFiModule) Show(by string) error {
|
func (w *WiFiModule) Show(by string) error {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue