获取当前无线网络的SSID(使用--getinfo
)
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I
agrCtlRSSI: -51
agrExtRSSI: 0
agrCtlNoise: -93
agrExtNoise: 0
state: running
op mode: station
lastTxRate: 130
maxRate: 217
lastAssocStatus: 0
802.11 auth: open
link auth: wpa2-psk
BSSID: 0:31:c2:41:53:14
SSID: DansLeVille
MCS: 15
channel: 5
但是,如果您想获取您所在区域的所有wifi,(请使用--scan
)
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s
SSID BSSID RSSI CHANNEL HT CC SECURITY (auth/unicast/group)
America_Online 00:71:c2:9a:11:b0 -86 1 Y US WPA(PSK/AES,TKIP/TKIP) WPA2(PSK/AES,TKIP/TKIP)
xfinitywifi 00:71:c2:9a:11:b2 -72 1 Y US NONE
xfinitywifi 84:00:2d:78:ee:ea -56 11 Y US NONE
amber 74:1b:b2:d5:93:a9 -53 104 Y US WPA2(PSK/AES/AES)
xfinitywifi 74:85:2a:a9:f3:4a -66 11 Y US NONE
HOME-1A17-2.4 74:85:2a:a9:f3:48 -66 11 Y US WPA(PSK/AES,TKIP/TKIP) WPA2(PSK/AES,TKIP/TKIP)
Cooper Works Streaming 90:a7:c1:b9:6c:37 -50 11,-1 Y -- WPA(PSK/AES,TKIP/TKIP) WPA2(PSK/AES,TKIP/TKIP)
amber 74:1b:b2:d5:93:a8 -49 11 Y US WPA2(PSK/AES/AES)
获取无线密码
sudo security find-generic-password -D "AirPort network password" -a YOUR_SSID_NAME -g | grep password:
password: "pseudononymous1234!!!"
您会password:
在末尾看到。