mirror of
https://github.com/bettercap/bettercap
synced 2025-07-16 10:03:39 -07:00
fix: supporting hidden networks
This commit is contained in:
parent
8720327743
commit
fc840f413f
2 changed files with 8 additions and 1 deletions
|
@ -133,6 +133,10 @@ func (w *WiFiRecon) getRow(station *network.Station) []string {
|
||||||
}
|
}
|
||||||
|
|
||||||
ssid := station.ESSID()
|
ssid := station.ESSID()
|
||||||
|
if ssid == "<hidden>" {
|
||||||
|
ssid = core.Dim(ssid)
|
||||||
|
}
|
||||||
|
|
||||||
encryption := station.Encryption
|
encryption := station.Encryption
|
||||||
if encryption == "OPEN" || encryption == "" {
|
if encryption == "OPEN" || encryption == "" {
|
||||||
encryption = core.Green("OPEN")
|
encryption = core.Green("OPEN")
|
||||||
|
|
|
@ -52,7 +52,10 @@ func Dot11ParseIDSSID(packet gopacket.Packet) (bool, string) {
|
||||||
for _, layer := range packet.Layers() {
|
for _, layer := range packet.Layers() {
|
||||||
if layer.LayerType() == layers.LayerTypeDot11InformationElement {
|
if layer.LayerType() == layers.LayerTypeDot11InformationElement {
|
||||||
dot11info, ok := layer.(*layers.Dot11InformationElement)
|
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)
|
return true, string(dot11info.Info)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue