很多时候我们电脑连上wifi之后就把密码忘记了,这个时候如果同事问自己密码是多少,如果作为程序员说不知道是不是感觉有点不好意思,哈哈……
我使用的是windows电脑,就以windows为例说明下自己是如何查看的。
windows + r
快捷键,然后输入cmd
回车就打开了netsh wlan show profiles
可以看到电脑已经配置了wifi。效果如下C:\Users\username>netsh wlan show profiles
Profiles on interface WLAN:
Group policy profiles (read only)
---------------------------------
<None>
User profiles
-------------
All User Profile : test-5G
netsh wlan show profiles name="profileName" key=clear
就可以看到密码了。效果如下。Security settings中的Key Content后面的内容就是密码C:\Users\username>netsh wlan show profiles name="test-5G" key=clear
Profile gc on interface WLAN:
=======================================================================
Applied: All User Profile
Profile information
-------------------
Version : 1
Type : Wireless LAN
Name : gc
Control options :
Connection mode : Connect automatically
Network broadcast : Connect only if this network is broadcasting
AutoSwitch : Do not switch to other networks
MAC Randomization : Disabled
Connectivity settings
---------------------
Number of SSIDs : 1
SSID name : "test-5G"
Network type : Infrastructure
Radio type : [ Any Radio Type ]
Vendor extension : Not present
Security settings
-----------------
Authentication : WPA2-Personal
Cipher : CCMP
Authentication : WPA2-Personal
Cipher : GCMP
Security key : Present
Key Content : aa123456
Cost settings
-------------
Cost : Unrestricted
Congested : No
Approaching Data Limit : No
Over Data Limit : No
Roaming : No
Cost Source : Default