相信有很大一部分人都不知道怎么看已經連過的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?"獲取異常"