相信有很大一部分人都不知道怎么看已经连过的WiFi密码。
你还在手动查询自己的电脑连接过得WiFi密码吗?
—————【下 载 地 址】———————
【本章单下载】:https://drive.uc.cn/s/dbbedf933dad4
【百款黑科技】:https://ucnygalh6wle.feishu.cn/wiki/HPQywvPc7iLZu1k0ODFcWMt2n0d?from=from_copylink
—————【下 载 地 址】———————
哈哈哈,懒人福音来了,自己搞了一个软件,可以查看电脑连接过的WiFi密码,妈妈再也不用担心我记不住密码了
简单的操作界面,打开软件自动获取数据,左侧为WiFi名称,右侧为密码。
本工具使用py语言编写,界面使用qt5,有兴趣的朋友可以自行扩展工能
核心功能:
def load_wifi_list(self):
self.tree.clear()
try:
# 获取WiFi列表
stdout, err = self.run_command('netsh wlan show profiles')
if err:
raise Exception(f"命令执行错误:{err}")
if not stdout:
raise Exception("无输出结果,请检查命令")
# 解析WiFi名称
profiles = []
for line in stdout.split('\n'):
if "所有用户配置文件" in line or "All User Profile" in line:
parts = line.split(":")
if len(parts) >= 2:
profile = parts[1].strip()
if profile:
profiles.append(profile)
if not profiles:
QMessageBox.information(self, "提示", "未找到保存的WiFi配置")
return
# 获取密码(增强版)
for profile in profiles:
password = self.get_wifi_password(profile)
QTreeWidgetItem(self.tree, [profile, password])
except Exception as e:
QMessageBox.critical(self, "错误", f"加载失败:{str(e)}")
def get_wifi_password(self, profile_name):
"""增强版密码获取"""
try:
stdout, _ = self.run_command(
f'netsh wlan show profile name="{profile_name}" key=clear'
)
if not stdout:
return "获取失败"
# 检测企业级网络
if self._is_enterprise_network(stdout):
return "企业级网络(需账号)"
# 检测开放网络
if self._is_open_network(stdout):
return "开放网络"
# 多语言密码关键词检测
password = self._extract_password(stdout)
return password if password else "无密码"
except Exception:
return "获取异常"