使用cmd查看电脑连接过的wifi密码(二)
上次写了一个查看wifi的bat文件(https://www.cnblogs.com/feiquan/p/9823402.html),发现有个问题就没法保存到记事本,而且还要处理不同的系统语言,这次重新更新了一下文件。
获取方式:
1.可直接拷贝代码到记事本后改后缀为bat
2.百度网盘:
链接:https://pan.baidu.com/s/11syCrBvehtpPo7R9cfpk0g
提取码:8qhn
主要有3个文件:
Password是最后密码的存放文件夹,其中的文件是以时间命名的,保证不会覆盖
WiFiPassswordSave.bat 是功能选择界面(直接双击它运行)
seeWiFi.bat :是第一个功能(直接查看wifi密码)
saveWiFi.bat:是第二个功能(保存密码到当前目录下的Password\wifiPassword.txt),如果是直接双击此文件或者不带参数,在输出完成后会自动打开密码所在的文件夹,如果在命令行中输入( saveWiFi.bat h)加入参数 h,将会定位到密码所在的文件夹,并列出文件目录
提示:这三个bat文件必须要放在同一个文件夹下,如果使用cmd命令可单独调用seeWiFi.bat 和saveWiFi.bat
更新情况:
- REM echo UpdataDate:// :
- REM echo Version:1.1.1v
- REM 修复wifi名为空时,打印不完全
- rem 重命名保存的文件名 主机名+用户名+wifiPassword+当前时间
- rem 更改临时文件的位置
上代码(可直接拷贝代码到记事本后改后缀为bat):
WiFiPassswordSave.bat
- @echo off
- if not "%OS%"=="Windows_NT" EXIT
- REM if not "%0"=="WiFiPassswordSave.bat" exit
- chcp >nul
- if "%1"=="back" (
- echo ====================================
- goto fun
- )
- Title WiFiPasswordSave
- echo WiFiPasswordSave
- color
- echo ====================================
- echo Author:feiquan
- echo Create:// :
- echo UpdataDate:// :
- echo Version:1.1.1v
- echo Function:See and Save your computer connnect all WiFi password
- REM echo Function:See and Save your computer connnect all WiFi password
- REM 修复wifi名为空时,打印不完全
- rem 重命名保存的文件名
- rem 更改临时文件的位置
- REM echo =====================================
- rem 删除不需要的文件
- if exist "%temp%\userfiles.txt" ( del %temp%\userfiles.txt )
- if exist "%temp%\userfiles2.txt" ( del %temp%\userfiles2.txt )
- if exist "%temp%\password.txt" (del %temp%\password.txt)
- if exist "%temp%\wifiPassword2.txt" ( del %temp%\wifiPassword2.txt )
- :fun
- rem 选择功能
- echo Select function:
- echo .See WiFi password
- echo .Save all Wifi Password to wifipassword.txt
- echo .exit
- echo =====================================
- set num=
- set /p num=请输入你想执行那个功能^(默认:^)^:
- if %num%== (
- rem 功能一:直接查看wifi密码
- call seeWiFi.bat
- ) else if %num%== (
- rem 功能二:保存密码到当前目录下的Password\wifi%temp%\password.txt
- call saveWiFi.bat
- ) else (
- rem 删除不需要的文件
- if exist "%temp%\userfiles.txt" ( del %temp%\userfiles.txt )
- if exist "%temp%\userfiles2.txt" ( del %temp%\userfiles2.txt )
- if exist "%temp%\password.txt" (del %temp%\password.txt)
- if exist "%temp%\wifiPassword2.txt" ( del %temp%\wifiPassword2.txt )
- exit
- )
- pause
- exit
seeWiFi.bat
- @echo off
- if not "%OS%"=="Windows_NT" EXIT
- if not "%0"=="seeWiFi.bat" exit
- chcp >nul
- title seeWiFi
- REM echo WiFiPasswordSave
- REM echo ====================================
- REM echo Author:feiquan
- REM echo Create:// :
- REM echo UpdataDate:// :
- REM echo Version:1.1.1v
- REM echo Function:See and Save your computer connnect all WiFi password
- REM 修复wifi名为空时,打印不完全
- rem 重命名保存的文件名
- rem 更改临时文件的位置
- REM echo =====================================
- rem 获取用户配置文件,实时刷新
- netsh wlan show profiles |find "All User Profile" >%temp%\userfiles.txt
- rem 提取SSID name
- powershell -Command "(gc %temp%\userfiles.txt) -replace ' All User Profile : ', ''" >%temp%\userfiles2.txt
- rem 删除不需要的文件
- if exist "%temp%\userfiles.txt" ( del %temp%\userfiles.txt )
- rem 功能一:直接查看wifi密码
- rem 列出wifi名
- echo Your computer connnect all WiFi name:
- for /f "tokens=*" %%f in (%temp%\userfiles2.txt) do echo %%f
- rem 选择wifi,给name赋值
- echo =====================================
- :loop
- set /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 exist
- echo =====================================
- :continue
- set con=y
- set /p con=Continue to look up other WiFi password^(默认:y^/n^/q^)^:
- if "%con%"=="y" (
- goto loop
- ) else if "%con%"=="n" (
- call WiFiPassswordSave.bat back
- ) else if "%con%"=="q" (
- if exist "%temp%\userfiles.txt" ( del %temp%\userfiles.txt )
- if exist "%temp%\userfiles2.txt" ( del %temp%\userfiles2.txt )
- exit
- ) else (
- goto continue
- )
- rem 功能一:end
saveWiFi.bat
- @echo off
- if not "%OS%"=="Windows_NT" EXIT
- if not "%0"=="saveWiFi.bat" exit
- @echo off
- chcp >nul
- title saveWiFi
- REM echo WiFiPasswordSave
- REM echo ====================================
- REM echo Author:feiquan
- REM echo Create:// :
- REM echo UpdataDate:// :
- REM echo Version:1.1.1v
- REM echo Function:See and Save your computer connnect all WiFi password
- REM 修复wifi名为空时,打印不完全
- rem 重命名保存的文件名
- rem 更改临时文件的位置
- REM echo =====================================
- echo Starting working ....
- rem 删除不需要的文件
- if "%1"=="h" (
- if exist "%temp%\userfiles.txt" ( del %temp%\userfiles.txt )
- if exist "%temp%\userfiles2.txt" ( del %temp%\userfiles2.txt )
- if exist "%temp%\password.txt" (del %temp%\password.txt)
- if exist "%temp%\wifiPassword2.txt" ( del %temp%\wifiPassword2.txt )
- )
- rem 获取用户配置文件,实时刷新
- netsh wlan show profiles |find "All User Profile" >%temp%\userfiles.txt
- rem 提取SSID name
- powershell -Command "(gc %temp%\userfiles.txt) -replace ' All User Profile : ', ''" >%temp%\userfiles2.txt
- rem 删除不需要的文件
- if exist "%temp%\userfiles.txt" ( del %temp%\userfiles.txt )
- rem 功能二:保存密码到%temp%\password.txt
- rem 遍历SSID name
- for /F "tokens=*" %%i in (%temp%\userfiles2.txt) do (
- echo ==========================================================>>%temp%\password.txt
- ((netsh wlan show profiles name="%%i" key=clear |find "SSID name")||echo SSID name : "%%i" )>>%temp%\password.txt
- ((netsh wlan show profiles name="%%i" key=clear |find "Key Content")||echo Key Content : NO exist )>>%temp%\password.txt
- )
- rem 替换关键字
- powershell -Command "(gc %temp%\password.txt) -replace 'SSID name', 'Wifi name'" >%temp%\wifiPassword2.txt
- set cName=%computername%
- set uName=%username%
- powershell -Command "(gc %temp%\wifiPassword2.txt) -replace 'Key Content','Password '>%cName%_%uName%_wifiPassword"$(Get-Date -Format 'yyyyMd Hms')".txt"
- rem 删除不需要的文件
- if exist "%temp%\userfiles.txt" ( del %temp%\userfiles.txt )
- if exist "%temp%\userfiles2.txt" ( del %temp%\userfiles2.txt )
- if exist "%temp%\password.txt" (del %temp%\password.txt)
- if exist "%temp%\wifiPassword2.txt" ( del %temp%\wifiPassword2.txt )
- rem 移动文件
- if not exist Password mkdir Password
- move %cName%_%uName%_wifiPassword* .\Password
- cd Password
- if not "%1"=="h" (
- start .\
- exit
- )
- dir
- rem 功能二:end
使用cmd查看电脑连接过的wifi密码(二)的更多相关文章
- 使用cmd查看电脑连接过的wifi密码并将密码发送至指定邮箱(三)
之前,我写了使用cmd查看电脑连接过的wifi密码(二)和使用cmd查看电脑连接过的wifi密码(一)但其中的功能不完善,在本次的更新中新增了更多的功能,其实2018/10/24 就更新完成了,一直拖 ...
- 使用cmd查看电脑连接过的wifi密码(一)
有时总会忘记之前的wifi密码,这时候就需要查看wifi密码: 这个我就写了一个bat文件,方便下次使用,这里我添加了中文和英文的判断,主要是语言不同输出的信息不用,不说了直接上代码: @echo o ...
- 查看window系统电脑连接过的wifi密码
电脑连接过的wifi都会有痕迹,包括SSID号和密码等信息,借此可以回查wifi密码信息. 步骤: 1.开始----运行----输入cmd 2.在dos窗口输入以下代码: “for /f " ...
- windows10查看电脑已经保存的wifi密码
1,打开windows的命令窗口,输入 netsh wlan show profiles,如下图,这个命令仅仅只是查看一下电脑保存的所有的wifi名字 2,需要查看密码的话,则需要输入这个命令, ...
- 怎样查看电脑登录过的wifi密码?
https://jingyan.baidu.com/album/fcb5aff770f7e6edaa4a71d9.html?picindex=7
- 查找已连接过的wifi密码
无意之间看到能破解已连接过的wifi密码的诀窍,赶紧存储下来. 1. 首先打开终端 2. 在没有网路的情况下输入: netsh wlan show profiles 结果如下(自己的): 这些‘用户配 ...
- [转帖]一键获取 所有连接过的wifi 密码
cmd 一键获取 所有连接过的wifi 密码 转帖来源: http://www.cnblogs.com/hookjoy/p/5537623.html for /f "skip=9 token ...
- 电脑cmd命令快速查看连接过的WIFI密码信息
只是突然发现,好奇心作怪,试了一下,妈妈再也不用担心我忘记家里的wifi密码了 1.直接打开"运行"(win键+R) 2.输入CMD 确定 3.输入下面cmd命令.鼠标粘贴 for ...
- win10以前连接过的wifi密码怎么查看
右键点击开始,在菜单中选择打开命令提示符,以管理员的权限打开. 然后输入命令netsh wlan show profile显示以前此电脑连接过的所有WIFI记录配置信息. 确定要查看的WIFI ...
随机推荐
- [Swift]LeetCode519. 随机翻转矩阵 | Random Flip Matrix
You are given the number of rows n_rows and number of columns n_cols of a 2D binary matrix where all ...
- [Swift]LeetCode657. 机器人能否返回原点 | Robot Return to Origin
There is a robot starting at position (0, 0), the origin, on a 2D plane. Given a sequence of its mov ...
- [Swift]LeetCode851. 喧闹和富有 | Loud and Rich
In a group of N people (labelled 0, 1, 2, ..., N-1), each person has different amounts of money, and ...
- [Swift]LeetCode976. 三角形的最大周长 | Largest Perimeter Triangle
Given an array A of positive lengths, return the largest perimeter of a triangle with non-zero area, ...
- 为什么公司宁愿 25K 重新招人,也不给你加到 20K?原因太现实……
年底了,还有几天就要过年了,年后必定又是一波跳槽季,我们为什么要跳槽,为什么公司不能满足我们加薪的需求? 说到这个话题,想必从事码农的各位都清楚的一个道理:工资都是跳出来的,其他行业我不太清楚,但在 ...
- 面试题:反转字符串(leetcode344)
编写一个函数,其作用是将输入的字符串反转过来.输入字符串以字符数组 char[] 的形式给出. 不要给另外的数组分配额外的空间,你必须原地修改输入数组.使用 O(1) 的额外空间解决这一问题. 你可以 ...
- ThinkPHP 数据库操作(四) : 聚合查询、时间查询、高级查询
聚合查询 在应用中我们经常会用到一些统计数据,例如当前所有(或者满足某些条件)的用户数.所有用户的最大积分.用户的平均成绩等等,ThinkPHP为这些统计操作提供了一系列的内置方法,包括: 用法示例: ...
- BBS论坛(二十四)
24.1.编辑板块 cms/js/banners.js $(function () { $('.edit-board-btn').click(function () { var self = $(th ...
- Mac版AppStore无法下载、升级错误处理
在mac版本AppStore下载软件的时候,有时会出现"This item is temporarily unavailable, Try again later"错误提示,当然等 ...
- 带着萌新看springboot源码13(手写一个自己的starter)
springboot的最强大的就是那些xxxAutoconfiguration,但是这些xxxAutoConfiguration又依赖那些starter,只有导入了这些场景启动器(starter),我 ...