This program is the advanced or you can say GUI version of “See connected wifi passwords using Python“. So if you want to understand the logic of how to see wifi password using Python then we suggest you go to the “See connected wifi passwords using Python”. Where we have explained all about how can we see the previously connected wifi passwords.
So, this is the program where you can see the previously connected wifi passwords just by clicking the buttons, and also you can copy them to clipboard as well.
We are using tkinter
for GUI and pyperclip
to copy the extracted passwords to the clipboard.
Code
from tkinter import * import pyperclip root = Tk() root.geometry("400x400") pass_details = StringVar() myList = [] def see_wifi_pass(): import subprocess global myList data = subprocess.check_output(['netsh', 'wlan', 'show', 'profiles']).decode('utf-8').split('\n') profiles = [i.split(":")[1][1:-1] for i in data if "All User Profile" in i] for i in profiles: results = subprocess.check_output(['netsh', 'wlan', 'show', 'profile', i, 'key=clear']).decode('utf-8').split( '\n') results = [b.split(":")[1][1:-1] for b in results if "Key Content" in b] try: myList.append(i) myList.append("--") myList.append(results[0]) myList.append("|") except IndexError: myList.append(i) myList.append("--") myList.append("") def show_wifi_pass(): pass_details.set(myList) def copytoclipboard(): password = pass_details.get() pyperclip.copy(password) Label(root, text="Gui Wifi Password Checker", font="calibri 20 bold").pack() Button(root, text="Initiate Process Now", command=see_wifi_pass).pack(pady=10) Button(root, text="Show wifi pass details", command=show_wifi_pass).pack(pady=10) Entry(root, textvariable=pass_details, width=50).pack(pady=10) Button(root, text="Copy to clipbord", command=copytoclipboard).pack(pady=10) root.mainloop()
You can copy our code if you are facing any issues while running your code, and below is the output of our code GUI Application To See wifi password in Python:-
Updated Version:
from tkinter import * import pyperclip root = Tk() root.geometry("900x900") pass_details = StringVar() myList = [] def see_wifi_pass(): import subprocess global myList data = subprocess.check_output(['netsh', 'wlan', 'show', 'profiles']).decode('utf-8').split('\n') profiles = [i.split(":")[1][1:-1] for i in data if "All User Profile" in i] myList.append("------------------------") for i in profiles: results = subprocess.check_output(['netsh', 'wlan', 'show', 'profile', i, 'key=clear']).decode('utf-8').split('\n') results = [b.split(":")[1][1:-1] for b in results if "Key Content" in b] try: myList.append("Wifi-->" + i) # myList.append("--") myList.append("Password-->" +results[0]) myList.append("------------------------") except IndexError: myList.append("Wifi-->" +i) # myList.append("--") myList.append("") def show_wifi_pass(): def listToString(s): # initialize an empty string myStr = "" # traverse in the string for ele in s: myStr = myStr + ele + "\n" # return string return myStr myStr = listToString(myList) pass_details.set(myStr) def copytoclipboard(): password = pass_details.get() pyperclip.copy(password) Label(root, text="Gui Wifi Password Checker", font="calibri 20 bold").place(x = 60,y = 50) Button(root, text="Initiate Process Now", command=see_wifi_pass).place(x = 60, y = 90) Button(root, text="Show wifi pass details", command=show_wifi_pass).place(x = 60, y = 130) Entry(root, textvariable=pass_details).place(width=800, height=50, x = 60, y = 160) Button(root, text="Copy to clipbord", command=copytoclipboard).place(x = 60, y = 220) root.mainloop()
Also read:
- Simple Code to compare Speed of Python, Java, and C++?Introduction There’s often a lot of debate about the speed of different programming languages, with many assuming that C++ is always the fastest and Python is the slowest. However, it’s not as straightforward as it seems. In this article, I’ll walk you through simple programs with the same logic written in Python, Java, and C++…
- Falling Stars Animation on Python.Hub October 2024Hello Python enthusiasts! Check out the cool animation below, featured on our Instagram page, python.hub. You can view the latest reel, posted on October 8, 2024, showcasing this animation. View this post on Instagram A post shared by Lalit Tomar • AI & Coding Wizard (@python.hub) Want the code for this reel? Simply follow this…
- Most Underrated Database Trick | Life-Saving SQL CommandHello folks! Today we are again back with a super important article on the Most underrated SQL & Database Trick to save your entire application. Maintaining the data integrity of your application is very important in this world of software development. However, even experienced engineers may encounter situations where mistakes happen in changing or updating…
- Python List MethodsHello friends, in this article, we will explore various Python List methods, indispensable tools in a programmer’s toolkit for manipulating lists efficiently. List methods in Python are built-in functions designed to perform specific tasks when applied to lists. To access a method in Python, we simply use the dot notation (.), linking the method to…
- Top 5 Free HTML Resume Templates in 2024 | With Source CodeIntroduction Hello friends! Welcome to another article where I will share more useful resources for free. Today, I will share the Best 5 HTML resume templates in 2024 with source code. I have found the best HTML templates with a combination of different types; one is good in design, and the other is good in…