查看: 554|回复: 0

windows wifi密码查看器

[复制链接]
发表于 2022-12-21 15:09 | 显示全部楼层 |阅读模式
非法程序、 2022-12-21 15:09 554 0 显示全部楼层
看到论坛里的其他朋友做的密码查看器,觉得好玩,自己用python写了一个很简陋的查看器

  1. import tkinter
  2. from tkinter import ttk
  3. import os
  4. import re


  5. cmd = "netsh wlan show profiles"
  6. str0 = os.popen(cmd).read()
  7. str1 = re.findall('(\u6240\u6709\u7528\u6237\u914d\u7f6e\u6587\u4ef6...)(.*)', str0)

  8. outList1 = []
  9. outList2 = []
  10. for i in str1:
  11.     cmd = "netsh wlan show profiles name="" + i[1] + "" key=clear"
  12.     str2 = os.popen(cmd).read()
  13.     output = re.search('(\u5173\u952e\u5185\u5bb9\s*.\s)(.*)', str2).group(2)
  14.     outList1.append(i[1])
  15.     outList2.append(output)

  16. # GUI
  17. top = tkinter.Tk()
  18. top.geometry("250x60")
  19. top.title("Wifi密码查看器")

  20. lab1 = tkinter.Label(top, text="Wifi : ")
  21. lab2 = tkinter.Label(top, text="PassWord : ")
  22. lab1.grid(row=0)
  23. lab2.grid(row=1)

  24. entry = tkinter.Entry(top)
  25. entry.grid(row=1, column=1)
  26. cbox = ttk.Combobox(top)
  27. cbox.grid(row=0, column=1)
  28. cbox["value"] = outList1

  29. def func(cbox):
  30.     index = cbox.current()
  31.     entry.delete(0, tkinter.END)
  32.     entry.insert(0, outList2[index])

  33. cbox.bind("<<ComboboxSelected>>",lambda event:func(cbox))

  34. top.mainloop()
复制代码
链接:https://zn50.lanzoue.com/iWDDG0j458qd
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则 返回列表 发新帖

快速回复 返回顶部 返回列表