This batch file is useful to visualize passwords stored in your PC.
Just double click in wifi.bat once you get the file in your windows system. The code loops, press X when you are done.
- Windows 10
This batch file is useful to visualize passwords stored in your PC.
Just double click in wifi.bat once you get the file in your windows system. The code loops, press X when you are done.
| @echo OFF | |
| setlocal EnableDelayedExpansion | |
| :start | |
| :: Initialize password and substring | |
| SET password=NONE | |
| SET "substring=Key Content" | |
| :: Print profiles | |
| NETSH WLAN SHOW PROFILE | |
| :: Ask for a profile name | |
| SET /P profile= Please write one of the Profile names to see the password: | |
| :: Write profile info to temp file | |
| >output.tmp NETSH WLAN SHOW PROFILE "!profile!" KEY=CLEAR | |
| :: Set password with the password if found | |
| for /F "tokens=*" %%a in (output.tmp) do ( | |
| set string=%%a | |
| if not "!string:%substring%=!"=="!string!" ( | |
| set password=!string! | |
| ) | |
| ) | |
| :: If no password, reset. | |
| IF "!password!"=="NONE" ( | |
| GOTO :reset | |
| ) | |
| :: Print password | |
| echo !password! | |
| PAUSE | |
| :reset | |
| cls | |
| GOTO :start |