Use CMD to view your computer's connected WiFi password (ii)

Source: Internet
Author: User

Tags: command output input move other files name span style

Last time I wrote a bat file to view WiFi (https://www.cnblogs.com/feiquan/p/9823402.html), I found that there was a problem that could not be saved to Notepad, but also to deal with different system languages, this time re-updated the file.

How to obtain :

1. You can copy the code directly to Notepad and change the suffix to bat.

2. Baidu Network Disk:

Links: HTTPS://PAN.BAIDU.COM/S/1VRSRHA9GLFTT6FCVRPHUCW
Extract code: W3BW

There are 3 main files:

Password is the last password folder where the files are named in time and are guaranteed not to overwrite

Wifipassswordsave.bat is a feature selection interface (directly double-click it to run)

Seewifi.bat: Is the first feature (view WiFi password directly)

Savewifi.bat: Is the second function (save the password to the current directory of Password\wifipassword.txt), if you double-click the file or without parameters, after the output is completed will automatically open the folder where the password, if entered in the command line ( Savewifi.bat h) Add the parameter H and will locate the folder where the password is located and list the file directory

Tip: These three bat files must be placed in the same folder, and Seewifi.bat and Savewifi.bat can be called separately if you use the cmd command

On the code (you can copy the code directly to Notepad and change the suffix to bat):

Wifipassswordsave.bat

@echo offifNot"%os%"=="Windows_NT"ExitremifNot"%0"=="Wifipassswordsave.bat"exitchcp65001if "%1"==" Back"(Echo====================================GotoFun ) echo Wifipasswordsaveecho====================================echo Author:feiquanecho Create:2018/Ten/ -  -: theecho updatadate:2018/Ten/ +  -: Aecho Version:1. 1vecho Function:see and Save your computer connnect all WiFi Passwordecho=====================================: Funrem Select function echo Select Function:echo1. See WiFi Passwordecho2. Save all Wifi Password to Wifipassword.txtecho3. Exitecho=====================================Setnum=2Set/P num= Please enter the function you want to perform ^ (default:2^)^:if%num%==1(REM function one: View wifi password directly call Seewifi.bat)Else if%num%==2(REM Function II: Save the password to the current directory of Password\wifipassword.txtcall Savewifi.bat)Else(rem delete unwanted filesifExist"Userfiles.txt"(del userfiles.txt)ifExist"Userfiles2.txt"(del userfiles2.txt)ifExist"Password.txt"(del password.txt)ifExist"WifiPassword2.txt"(del wifiPassword2.txt) exit) Pauseexit

Seewifi.bat

@echo offifNot"%os%"=="Windows_NT"EXITifNot"%0"=="Seewifi.bat"exitchcp65001REM echo Wifipasswordsaverem Echo====================================REM Echo Author:feiquanrem echo Create:2018/Ten/ -  -: theREM echo updatadate:2018/Ten/ +  -: AREM echo Version:1. 1vREM echo Function:see your computer connnect all WiFi passwordrem echo=====================================rem Get user profile, real-time refresh netsh wlan show profiles|find"All User profiles">Userfiles.txtrem extracting SSID name PowerShell-command"(GC. \userfiles.txt)-replace ' All User profiles: ', '">Userfiles2.txtrem Delete files that you do not needifExist"Userfiles.txt"(del userfiles.txt) REM function one: direct view wifi password REM list WiFi name echo Your computer connnect all WiFi name: for/F%%finch(Userfiles2.txt) Doecho percentFrem Select WiFi, give name a value echo=====================================: LoopSet/P Name=Please input your WiFi name (SSID):(netsh wlan show profiles name="%name%"Key=clear |find"SSID name") || echo SSID Name:"%name%"(netsh wlan show profiles name="%name%"Key=clear |find"Key Content") ||echo Key content:no existecho=====================================:ContinueSettemp=ySet/P temp=continue to look up other WiFi password^ (default: y^/n^/q^) ^:if "%temp%"=="y" (Gotoloop)Else if "%temp%"=="N"(call Wifipassswordsave.bat back)Else if "%temp%"=="Q" (ifExist"Userfiles.txt"(del userfiles.txt)ifExist"Userfiles2.txt"(del userfiles2.txt) exit)Else (Goto Continue) REM function one: End

Savewifi.bat

@echo offifNot"%os%"=="Windows_NT"ExitremifNot"%0"=="Savewifi.bat"exitchcp65001REM echo Wifipasswordsaverem Echo====================================REM Echo Author:feiquanrem echo Create:2018/Ten/ -  -: theREM echo updatadate:2018/Ten/ +  -: AREM echo Version:1. 1vREM echo Function:save your computer connnect all WiFi passwordrem echo=====================================rem Get user profile, real-time refresh netsh wlan show profiles|find"All User profiles">Userfiles.txtrem extracting SSID name PowerShell-command"(GC. \userfiles.txt)-replace ' All User profiles: ', '">Userfiles2.txtrem Delete files that you do not needifExist"Userfiles.txt"(del userfiles.txt) REM function Two: Save the password to the current directory Wifipassword.txtrem traversal SSID name for/F%%iinch(. \userfiles2.txt) Do(Echo==========================================================>>password.txt (netsh wlan show profiles name="%%i"Key=clear |find"SSID name")|| echo SSID Name:"%%i") >>password.txt (netsh wlan show profiles name="%%i"Key=clear |find"Key Content")|| echo Key content:no exist) >>password.txt) REM Replacement keyword PowerShell-command"(GC. \password.txt)-replace ' SSID name ', ' Wifi name '">Wifipassword2.txtpowershell-command"(GC. \wifipassword2.txt)-replace ' Key Content ', ' Password ' >wifipassword"$ (Get-date-format'Yyyymd Hms')". txt"rem Delete unwanted filesifExist"Userfiles.txt"(del userfiles.txt)ifExist"Userfiles2.txt"(del userfiles2.txt)ifExist"Password.txt"(del password.txt)ifExist"WifiPassword2.txt"(del wifiPassword2.txt) rem Move fileifNot exist Password mkdir Password move Wifipassword*. \PASSWORDCD PasswordifNot"%1"=="h"(Start \ Exit) DirRem function two: End

Use CMD to view your computer's connected WiFi password (ii)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

Tags Index: