From 872032774321dfaa120d1aaad453222e914b2af1 Mon Sep 17 00:00:00 2001 From: evilsocket Date: Tue, 20 Feb 2018 18:34:29 +0100 Subject: [PATCH] misc: small fix or general refactoring i did not bother commenting --- modules/wifi_recon.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/wifi_recon.go b/modules/wifi_recon.go index 841bc20b..33be5779 100644 --- a/modules/wifi_recon.go +++ b/modules/wifi_recon.go @@ -162,6 +162,10 @@ func (w *WiFiRecon) getRow(station *network.Station) []string { // method handle both access point and clients // transparently ap, _ := w.Session.WiFi.Get(station.HwAddress) + clients := "" + if ap.NumClients() > 0 { + clients = strconv.Itoa(ap.NumClients()) + } return []string{ fmt.Sprintf("%d dBm", station.RSSI), @@ -170,7 +174,7 @@ func (w *WiFiRecon) getRow(station *network.Station) []string { station.Vendor, encryption, strconv.Itoa(mhz2chan(station.Frequency)), - strconv.Itoa(ap.NumClients()), + clients, sent, recvd, seen,