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:

  • Top 25 Pattern Programs in C++
    In this article, I will show you the Top 25 Pattern Programs in C++ that you must learn which will help you to understand the usage of nested loops. We will learn to create different geometrical shapes like Squares, triangles, Rhombus, etc. We have provided the code as well as output for all the patterns…
  • Currency Converter in C++
    In this article, we will build a simple program for Currency Converter in C++. The user will be able to convert currencies like Dollar, Euro, Pound, and Rupee. This is a console application and very simple to understand as we only use a bunch of conditionals to write the entire program. Features Users can convert…
  • SQLite | CRUD Operations in Python
    CRUD stands for Create Read Update Delete. I will show you how to perform CRUD Operations in Python. You need basic Tkinter and SQLite knowledge before you read further. This app is straightforward, when you will open this app, a GUI with 4 green colored buttons will open to perform CRUD(create read update delete) operations….
  • Number Guessing Game in C++
    In this article, we will build a simple Number Guessing Game in C++. It’s a game in which the player has to guess a secret number in a range that is generated by the computer and upon a wrong guess by the player, the game will give hints to the player to guess the correct…
  • Image background remover in Python
    Hello friends, in this article, we will learn how to create an Image background remover in Python. I will first show you a simple program and then you will see a smile GUI made using tkinter. We need to install rembg, you can install rembg using the pip command: Image background remover in Python program…


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