A key to view the wireless password Win10 has been connected to the

With Win10 computer always have such a demand

WIFI password is valid? Forget all kinds of point to point, find a WIFI password for the current connection. . .

Before that links WIFI, is not in the vicinity can not be linked, to see how to do password?

a code line and so, once and for all.

A key to view the Win10 once had links wireless password

Copy the following code and save it as a .bat file, double-click to run. Note that the encoding is ANSI

::  author 奕空 2019年5月28日  https://my.oschina.net/openplus/blog/3055055
netsh wlan show profile
set /p wifiName=请输入要查看密码的WIFI名:
echo %wifiName%
netsh wlan export profile name=%wifiName% folder=. key=clear
::  打开文件
::  start "" %cd%"\WLAN-%wifiName%.xml"
@echo off
for /f "tokens=*" %%i in ('findstr "<keyMaterial>.*</keyMaterial>" %cd%"\WLAN-%wifiName%.xml"')do set "s=%%i"
set "s=%s:"=“”%"
for /f "delims=<" %%j in ("%s:*<keyMaterial>=%")do set "keyMaterial=%%j"
set "keyMaterial=%keyMaterial:“”="%"
echo 您要的WIFI密码是: %keyMaterial%
pause

Renderings:

Reproduced in: https: //my.oschina.net/openplus/blog/3055055

Guess you like

Origin blog.csdn.net/weixin_34150503/article/details/91962906