|
本帖最后由 baby1277 于 2024-12-24 22:56 编辑
直接上图
一句话代码- netsh wlan show profile * key=clear|findstr /i "名称 内容"|findstr /v SSID
复制代码
完整的代码
- @echo off
- cd /d %~dp0
- title baby1277
- setlocal enabledelayedexpansion
- :: 查询WiFi用户密码
- netsh wlan show profile|findstr /i "所有" >wifi1.txt
- for /f "tokens=2 delims=:" %%i in (wifi1.txt) do (
- set "Users=%%i"
- set "Users=!Users:~1!"
- netsh wlan show profile "!Users!" key=clear|findstr /i "名称 内容"|findstr /v SSID>>wifi2.txt
- )
- :: 整理WiFi用户密码信息
- set t=2
- for /f "delims=" %%i in (wifi2.txt) do (
- set /a t=t+=1
- if !t! gtr 2 set t=1&echo ---------------------------
- set wifi=%%i
- set wifi=!wifi:名称=WiFi用户!
- set password=!wifi:关键内容=WiFi密码!
- for /f "tokens=1-4" %%a in ('echo !password!') do echo %%a %%b %%c %%d
- )
- del /f /q wifi?.txt
- setlocal disabledelayedexpansion
- echo.&echo 查询完成,按任意键关闭窗口! & pause > nul
复制代码
查看WiFi用户密码(修正版).zip
(754 Bytes, 下载次数: 264)
|
评分
-
查看全部评分
|