GUI Application To See wifi password in Python

GUI Application To See wifi password in Python

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.

assignment advertisement

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:

  • Make money with Python in 2022
    Did you know that data science was the fifth most common job on LinkedIn in 2017? Did you know that the demand for Python programmers is expected to grow by 19% from 2020-2021? Did you know that Python is one of the fastest-growing programming languages, and it will likely continue to expand as its adoption…
  • Top 15 Python Libraries For Data Science in 2022
    Introduction In this informative article, we look at the most important Python Libraries For Data Science and explain how their distinct features may help you develop your data science knowledge. Python has a rich data science library environment. It’s almost impossible to cover everything in a single article. As a consequence, we’ve compiled a list…
  • Top 15 Python Libraries For Machine Learning in 2022
    Introduction  In today’s digital environment, artificial intelligence (AI) and machine learning (ML) are getting more and more popular. Because of their growing popularity, machine learning technologies and algorithms should be mastered by IT workers. Specifically, Python machine learning libraries are what we are investigating today. We give individuals a head start on the new year…
  • File Explorer in Python using Tkinter
    Introduction Welcome to copyassignment.com. In this tutorial, we are going to learn File Explorer in Python using the Tkinter module. What is basically a file explorer? A file explorer is nothing but an application that is used to manage certain files and folders on your device where we can open, edit, copy, delete and move…
  • Drawing Application in Python Tkinter
    Introduction In this article, we will design and construct a basic Drawing Application in Python Tkinter GUI, where we can simply draw something on the canvas using a pencil and erase with an eraser, as well as the ability to change the thickness of a pencil and eraser. We may also modify the canvas’s background…


Share:
Avatar of Harry

Author: Harry

Hello friends, thanks for visiting my website. I am a Python programmer. I, with some other members, write blogs on this website based on Python and Programming. We are still in the growing phase that's why the website design is not so good and there are many other things that need to be corrected in this website but I hope all these things will happen someday. But, till then we will not stop ourselves from uploading more amazing articles. If you want to join us or have any queries, you can mail me at admin@copyassignment.com Thank you

6 thoughts on “GUI Application To See wifi password in Python

  1. it run but can’t show password. only gives wifi name which connected already.

Comments are closed.