WiFi Password with Command Prompt windows 8.1

冷暖自知 提交于 2021-01-28 12:23:53

问题


I used this command to get connected WiFi password:

netsh wlan show profile name="my profile name" key=clear

but it doesn't show security key, it says:

key content = absent

Is there still any way to get it? why is it absent?


回答1:


From Help

netsh wlan show profile /?

If key is set to "clear" and the caller is local administrator, the key will be shown in plain text.




回答2:


You can use this batch file to get all of the ssid's and passwords from your system. Copy and paste the code below into notepad and save it as get_ssid_pwd.cmd and then open cmd as administrator, cd to the directory where you save the file and run it as get_ssid_pwd.cmd:

@echo off
setlocal enabledelayedexpansion
for /f "tokens=2delims=:" %%a in ('netsh wlan show profile ^|find /i "All User Profile"') do (
    set "ssid=%%~a"
    call :getpwd %%ssid:~1%%
)
:getpwd
for /f "tokens=2delims=:" %%i in ('netsh wlan show profile name^="%*" key^=clear ^| findstr /C:"Key Content"') do echo ssid: %* pass: %%i


来源:https://stackoverflow.com/questions/59099326/wifi-password-with-command-prompt-windows-8-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!