Answers:
我知道了!:)
sudo wpa_cli status
命令会确切地提供我想要的信息。
Selected interface 'wlan0'
bssid=80:1f:72:95:d2:b2
ssid=whatever
id=0
mode=station
pairwise_cipher=CCMP
group_cipher=TKIP
key_mgmt=WPA2-PSK
wpa_state=COMPLETED
ip_address=192.25.27.111
address=a4:4f:31:15:5f:44
uuid=6099d6ff-4b7d-538a-9e69-3479e250e401
该命令的输出很容易grep。
您可以从CLI尝试以下命令来列出SSID。
sudo iwlist wlan0 scan
或者你也可以使用
nmcli -f all dev wifi | grep SSID | awk '{ print $1 " - " $9 }'
要么
nmcli -f all dev wifi | awk '/SSID/{ print $1 " - " $9}'
将SSID替换为您需要信息的ssid。
请打开一个终端并运行:
sudo iwlist wlan0 scan
您的网络以及范围内的其他网络都会出现,类似于以下示例:
Cell 04 - Address: xx:C1:50:78:B7:xx
Channel:11
Frequency:2.462 GHz (Channel 11)
Quality=30/70 Signal level=-80 dBm
Encryption key:on
ESSID:"ATT630"
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
24 Mb/s; 36 Mb/s; 54 Mb/s
Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s
Mode:Master
Extra:tsf=00000021823cba79
Extra: Last beacon: 4340ms ago
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
因此,我们看到加密是WPA和TKIP的WPA2混合模式。