calfred2808

#Python See wifi password

Jul 19th, 2020
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.37 KB | None | 0 0
  1. from tkinter import *
  2. import pyperclip
  3. root = Tk()
  4. root.geometry("400x400")
  5. pass_details = StringVar()
  6. myList = []
  7.  
  8. def see_wifi_pass():
  9.     import subprocess
  10.     global myList
  11.     data = subprocess.check_output(['netsh', 'wlan', 'show', 'profiles']).decode('utf-8').split('\n')
  12.     profiles = [i.split(":")[1][1:-1] for i in data if "All User Profile" in i]
  13.     for i in profiles:
  14.         results = subprocess.check_output(['netsh', 'wlan', 'show', 'profile', i, 'key=clear']).decode('utf-8').split(
  15.             '\n')
  16.         results = [b.split(":")[1][1:-1] for b in results if "Key Content" in b]
  17.         try:
  18.             myList.append(i)
  19.             myList.append("--")
  20.             myList.append(results[0])
  21.             myList.append("|")
  22.         except IndexError:
  23.             myList.append(i)
  24.             myList.append("--")
  25.             myList.append("")
  26.  
  27. def show_wifi_pass():
  28.     pass_details.set(myList)
  29.  
  30.  
  31. def copytoclipboard():
  32.     password = pass_details.get()
  33.     pyperclip.copy(password)
  34.  
  35.  
  36. Label(root, text="Gui Wifi Password Checker", font="calibri 20 bold").pack()
  37. Button(root, text="Initiate Process Now", command=see_wifi_pass).pack(pady=10)
  38. Button(root, text="Show wifi pass details", command=show_wifi_pass).pack(pady=10)
  39. Entry(root, textvariable=pass_details, width=50).pack(pady=10)
  40. Button(root, text="Copy to clipbord", command=copytoclipboard).pack(pady=10)
  41.  
  42. root.mainloop()
Add Comment
Please, Sign In to add comment