From e93f2138e4b14b8452e0c3340aab941f31419ebb Mon Sep 17 00:00:00 2001 From: evilsocket Date: Sat, 17 Feb 2018 06:08:47 +0100 Subject: [PATCH] misc: small fix or general refactoring i did not bother commenting --- modules/wifi_recon.go | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/modules/wifi_recon.go b/modules/wifi_recon.go index 866a0ebc..44023dae 100644 --- a/modules/wifi_recon.go +++ b/modules/wifi_recon.go @@ -144,19 +144,8 @@ func (w *WiFiRecon) getRow(station *network.WiFiStation) []string { sent := humanize.Bytes(station.Sent) recvd := humanize.Bytes(station.Received) - row := []string{ - fmt.Sprintf("%d dBm", station.RSSI), - bssid, - ssid, - station.Vendor, - encryption, - strconv.Itoa(station.Channel), - sent, - recvd, - seen, - } if w.isApSelected() { - row = []string{ + return []string{ fmt.Sprintf("%d dBm", station.RSSI), bssid, station.Vendor, @@ -165,9 +154,19 @@ func (w *WiFiRecon) getRow(station *network.WiFiStation) []string { recvd, seen, } + } else { + return []string{ + fmt.Sprintf("%d dBm", station.RSSI), + bssid, + ssid, + station.Vendor, + encryption, + strconv.Itoa(station.Channel), + sent, + recvd, + seen, + } } - - return row } func mhz2chan(freq int) int {