misc: small fix or general refactoring i did not bother commenting

This commit is contained in:
evilsocket 2018-02-17 06:08:47 +01:00
parent eb5a72a44c
commit e93f2138e4

View file

@ -144,7 +144,18 @@ func (w *WiFiRecon) getRow(station *network.WiFiStation) []string {
sent := humanize.Bytes(station.Sent) sent := humanize.Bytes(station.Sent)
recvd := humanize.Bytes(station.Received) recvd := humanize.Bytes(station.Received)
row := []string{ if w.isApSelected() {
return []string{
fmt.Sprintf("%d dBm", station.RSSI),
bssid,
station.Vendor,
strconv.Itoa(station.Channel),
sent,
recvd,
seen,
}
} else {
return []string{
fmt.Sprintf("%d dBm", station.RSSI), fmt.Sprintf("%d dBm", station.RSSI),
bssid, bssid,
ssid, ssid,
@ -155,21 +166,9 @@ func (w *WiFiRecon) getRow(station *network.WiFiStation) []string {
recvd, recvd,
seen, seen,
} }
if w.isApSelected() {
row = []string{
fmt.Sprintf("%d dBm", station.RSSI),
bssid,
station.Vendor,
strconv.Itoa(station.Channel),
sent,
recvd,
seen,
} }
} }
return row
}
func mhz2chan(freq int) int { func mhz2chan(freq int) int {
// ambo! // ambo!
if freq <= 2484 { if freq <= 2484 {