mirror of
https://github.com/bettercap/bettercap
synced 2025-07-29 19:20:00 -07:00
misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
eb5a72a44c
commit
e93f2138e4
1 changed files with 13 additions and 14 deletions
|
@ -144,19 +144,8 @@ 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{
|
|
||||||
fmt.Sprintf("%d dBm", station.RSSI),
|
|
||||||
bssid,
|
|
||||||
ssid,
|
|
||||||
station.Vendor,
|
|
||||||
encryption,
|
|
||||||
strconv.Itoa(station.Channel),
|
|
||||||
sent,
|
|
||||||
recvd,
|
|
||||||
seen,
|
|
||||||
}
|
|
||||||
if w.isApSelected() {
|
if w.isApSelected() {
|
||||||
row = []string{
|
return []string{
|
||||||
fmt.Sprintf("%d dBm", station.RSSI),
|
fmt.Sprintf("%d dBm", station.RSSI),
|
||||||
bssid,
|
bssid,
|
||||||
station.Vendor,
|
station.Vendor,
|
||||||
|
@ -165,9 +154,19 @@ func (w *WiFiRecon) getRow(station *network.WiFiStation) []string {
|
||||||
recvd,
|
recvd,
|
||||||
seen,
|
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 {
|
func mhz2chan(freq int) int {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue