Skip to content

Commit 427821a

Browse files
authored
Add files via upload
1 parent 197bc22 commit 427821a

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
from tkinter import *
2+
import subprocess
3+
import pyperclip
4+
#making the gui for script
5+
root = Tk()
6+
root.geometry("600x600")
7+
pass_details = StringVar()
8+
myList = []
9+
10+
#function for fetching password and using the funtion of subprocess library
11+
def see_wifi_pass():
12+
global myList
13+
data = subprocess.check_output(['netsh', 'wlan', 'show', 'profiles']).decode('utf-8').split('\n')
14+
profiles = [i.split(":")[1][1:-1] for i in data if "All User Profile" in i]
15+
for i in profiles:
16+
results = subprocess.check_output(['netsh', 'wlan', 'show', 'profile', i, 'key=clear']).decode('utf-8').split(
17+
'\n')
18+
results = [b.split(":")[1][1:-1] for b in results if "Key Content" in b]
19+
try:
20+
myList.append(i)
21+
myList.append("--")
22+
myList.append(results[0])
23+
myList.append("|")
24+
except IndexError:
25+
myList.append(i)
26+
myList.append("--")
27+
myList.append("")
28+
29+
#showing the password
30+
def show_wifi_pass():
31+
pass_details.set(myList)
32+
33+
#copying to clipboard using pyperclip library
34+
def copytoclipboard():
35+
password = pass_details.get()
36+
pyperclip.copy(password)
37+
38+
#final layout for gui and printing all things
39+
Label(root, text="Getting all the Wifi passwords from your device", font="calibri 20 bold").pack()
40+
Button(root, text="Initiate Process Now", command=see_wifi_pass).pack(pady=10)
41+
Button(root, text="Show wifi pass details", command=show_wifi_pass).pack(pady=10)
42+
Entry(root, textvariable=pass_details, width=80).pack(pady=10)
43+
Button(root, text="Copy to clipbord", command=copytoclipboard).pack(pady=10)
44+
45+
root.mainloop()
46+

0 commit comments

Comments
 (0)