fix: supporting hidden networks

This commit is contained in:
evilsocket 2018-02-20 18:38:20 +01:00
parent 8720327743
commit fc840f413f
2 changed files with 8 additions and 1 deletions

View file

@ -133,6 +133,10 @@ func (w *WiFiRecon) getRow(station *network.Station) []string {
}
ssid := station.ESSID()
if ssid == "<hidden>" {
ssid = core.Dim(ssid)
}
encryption := station.Encryption
if encryption == "OPEN" || encryption == "" {
encryption = core.Green("OPEN")

View file

@ -52,7 +52,10 @@ func Dot11ParseIDSSID(packet gopacket.Packet) (bool, string) {
for _, layer := range packet.Layers() {
if layer.LayerType() == layers.LayerTypeDot11InformationElement {
dot11info, ok := layer.(*layers.Dot11InformationElement)
if ok == true && dot11info.ID == layers.Dot11InformationElementIDSSID && len(dot11info.Info) > 0 {
if ok == true && dot11info.ID == layers.Dot11InformationElementIDSSID {
if len(dot11info.Info) == 0 {
return true, "<hidden>"
}
return true, string(dot11info.Info)
}
}