中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁 > news >正文

做網(wǎng)站一定要學(xué)java嗎寫軟文平臺

做網(wǎng)站一定要學(xué)java嗎,寫軟文平臺,諸暨網(wǎng)站制作哪些公司制作,開源網(wǎng)站官網(wǎng)本章教程,主要分享一個本地wifi密碼查看器,用python實(shí)現(xiàn)的,感興趣的可以試一試。 具體代碼 import subprocess # 導(dǎo)入 subprocess 模塊,用于執(zhí)行系統(tǒng)命令 import tkinter as tk # 導(dǎo)入 tkinter 模塊,用于創(chuàng)建圖形用…

本章教程,主要分享一個本地wifi密碼查看器,用python實(shí)現(xiàn)的,感興趣的可以試一試。

在這里插入圖片描述

具體代碼

import subprocess  # 導(dǎo)入 subprocess 模塊,用于執(zhí)行系統(tǒng)命令
import tkinter as tk  # 導(dǎo)入 tkinter 模塊,用于創(chuàng)建圖形用戶界面
from tkinter import messagebox, ttk  # 從 tkinter 模塊中導(dǎo)入 messagebox 和 ttk 子模塊def get_wifi_passwords():"""獲取本地計(jì)算機(jī)上所有已連接過的 WiFi 配置文件及其密碼。"""try:# 執(zhí)行命令獲取所有 WiFi 配置文件的列表profiles_data = subprocess.check_output(['netsh', 'wlan', 'show', 'profiles']).decode('utf-8', errors='ignore')# 解析輸出,提取配置文件名稱profiles = [line.split(':')[1].strip() for line in profiles_data.split('\n') if "All User Profile" in line]wifi_passwords = []  # 存儲 WiFi 名稱和密碼的列表# 遍歷每個配置文件,獲取密碼for profile in profiles:profile_info = subprocess.check_output(['netsh', 'wlan', 'show', 'profile', profile, 'key=clear']).decode('utf-8', errors='ignore')password_lines = [line.split(':')[1].strip() for line in profile_info.split('\n') if "Key Content" in line]password = password_lines[0] if password_lines else "N/A"  # 如果沒有密碼,則顯示 "N/A"wifi_passwords.append((profile, password))return wifi_passwordsexcept Exception as e:# 如果發(fā)生錯誤,顯示錯誤信息messagebox.showerror("錯誤", f"發(fā)生錯誤: {str(e)}")return []def copy_password(event):"""復(fù)制選中的 WiFi 密碼到剪貼板。"""selected_item = tree.selection()[0]password = tree.item(selected_item, 'values')[1]root.clipboard_clear()root.clipboard_append(password)messagebox.showinfo("信息", "密碼已復(fù)制到剪貼板")def center_window(window, width, height):"""將窗口顯示在屏幕中央。"""screen_width = window.winfo_screenwidth()screen_height = window.winfo_screenheight()x = (screen_width - width) // 2y = (screen_height - height) // 2window.geometry(f'{width}x{height}+{x}+{y}')# 創(chuàng)建主窗口
root = tk.Tk()
root.title("WiFi 密碼查看器")  # 設(shè)置窗口標(biāo)題
window_width = 400
window_height = 300
root.geometry(f'{window_width}x{window_height}')  # 設(shè)置窗口大小
center_window(root, window_width, window_height)  # 窗口居中顯示# 創(chuàng)建表格
tree = ttk.Treeview(root, columns=('SSID', '密碼'), show='headings')
tree.heading('SSID', text='WiFi名稱', anchor='center')
tree.heading('密碼', text='WiFi密碼', anchor='center')
tree.column('SSID', anchor='center')
tree.column('密碼', anchor='center')
tree.pack(fill=tk.BOTH, expand=True)# 設(shè)置表格樣式
style = ttk.Style()
style.configure('Treeview', rowheight=25)
style.configure('Treeview.Heading', font=('Arial', 12, 'bold'))# 獲取 WiFi 密碼并顯示在表格中
wifi_passwords = get_wifi_passwords()
for wifi, password in wifi_passwords:tree.insert('', tk.END, values=(wifi, password))# 綁定雙擊事件,雙擊表格中的一行即可復(fù)制密碼
tree.bind('<Double-1>', copy_password)# 啟動主事件循環(huán)
root.mainloop()

點(diǎn)擊wifi名稱行,可以快速復(fù)制wifi密碼到粘貼板上。

http://www.risenshineclean.com/news/50470.html

相關(guān)文章:

  • php 網(wǎng)站 模板無錫百度競價公司
  • 代刷網(wǎng)站推廣鏈接快手百度賬號申請注冊
  • 局域網(wǎng)網(wǎng)站開發(fā)軟件seo優(yōu)化有哪些
  • 東莞公司網(wǎng)站建設(shè)公司河南網(wǎng)站顧問
  • 做網(wǎng)站站主需要什么條件天津提升專業(yè)關(guān)鍵詞排名
  • 上海做征信服務(wù)的公司網(wǎng)站愛網(wǎng)站關(guān)鍵詞查詢工具長尾
  • 企業(yè)門戶網(wǎng)站作用腰椎間盤突出壓迫神經(jīng)腿疼怎么治
  • 怎樣做天貓網(wǎng)站視頻公司網(wǎng)站建設(shè)代理
  • 珠海哪里做網(wǎng)站的網(wǎng)絡(luò)怎么做推廣
  • 桂林 網(wǎng)站 建設(shè)海南網(wǎng)站制作
  • 淄博周村網(wǎng)站建設(shè)公司廣州優(yōu)化公司哪家好
  • 視頻網(wǎng)站做短視頻百度推廣一個關(guān)鍵詞多少錢
  • wordpress 微博主題 twitter主題seo建站要求
  • 2018網(wǎng)站開發(fā)最流行的語言產(chǎn)品推廣網(wǎng)站哪個好
  • 杭州政府網(wǎng)站建設(shè)管理seo查詢系統(tǒng)源碼
  • 易語言怎么制作網(wǎng)站網(wǎng)上銷售平臺
  • 鄧州微網(wǎng)站開發(fā)seo標(biāo)題優(yōu)化是什么意思
  • 公司網(wǎng)站設(shè)計(jì)的企業(yè)西安百度網(wǎng)站排名優(yōu)化
  • 中國三大門戶網(wǎng)站是哪三個開源cms建站系統(tǒng)
  • 關(guān)于配色的網(wǎng)站千鋒教育靠譜嗎
  • 黃岡最專業(yè)的公司網(wǎng)站建設(shè)平臺西安百度seo代理
  • wordpress做一個視頻網(wǎng)站嗎刷網(wǎng)站排名軟件
  • 在線做網(wǎng)站索引線下營銷推廣方式都有哪些
  • 合肥搭建網(wǎng)站網(wǎng)絡(luò)營銷的基本特征有哪七個
  • 怎么用joomla做網(wǎng)站新公司怎么做網(wǎng)絡(luò)推廣
  • 自己做網(wǎng)站 做什么好以營銷推廣為主題的方案
  • wordpress 30天唐山seo推廣公司
  • 網(wǎng)站建設(shè)步驟大全石家莊seo推廣
  • 有哪些做網(wǎng)站的品牌天津百度推廣排名優(yōu)化
  • 做網(wǎng)站的費(fèi)用入賬優(yōu)化公司組織架構(gòu)