首先,新建一个xxx.bat文件
第二步:编辑(复制代码拷贝到xxx.bat中,保存)
:: 作者 zhengxinghua
@echo off
title 当前连接WiFi账户及密码
color
echo **************************************************************
for /f "tokens=3*" %%i in ('netsh WLAN show interfaces ^|find "配置文件"') do (
call :GetPass %%i %%j
)
pause
goto :eof
:GetPass
echo WiFi : %*
for /f "tokens=3*" %%a in ('netsh wlan show profile name^="%*" key^=clear ^| findstr "关键内容"') do (
echo 密码: %%a
)
echo --------------------------------------------------------------
goto :eof
最后 —》双击xxx.bat
成品展示:
喜欢一起探究的孩纸们,可以关注和私信,我也是初学者,还可以改很多东西,欢迎评价。
这个是Quicker上的源码,我的灵感也是来源于这篇文章
@echo off
title 以下为本机所连接过WIFI信息及密码
echo **************************************************************
for /f "tokens=3*" %%i in ('netsh wlan show profiles ^| findstr "所有用户配置文件"') do (
call :GetPass %%i %%j
)
pause
goto :eof
:GetPass
echo WiFi : %*
for /f "delims=" %%a in ('netsh wlan show profile name^="%*" key^=clear ^| findstr "关键内容"') do (
echo %%a
)
echo --------------------------------------------------------------
goto :eof`