Ready to Start Your Career?

Use Python to Check Saved Wi-fi Passwords

bachan 's profile image

By: bachan

August 15, 2017

Hello Cybrarians,I hope you all are good and having fun. This post is just for fun too, but let's get started.Sometimes you don't remember the password of the AP(Access Point) you are connected to. So you have many options to see the saved Wi-fi password. You can go for advanced wifi settings or you can type the commands into the command prompt. But these are some basic solutions, that are 'not-so-fun'. So, now let's check how the python script helps us in doing the fun parts. Here is a video you can see for more clarification:One method for doing this is import os: os.system('netsh wlan show profile name = "SSID" key=clear')Replace the SSID from your Wi-fi and save the file with the .py extension. Every time you want to get the password replaces internally. You can learn more about os modules.The second method is:import sys, osname = sys.argv[1]os.system('netsh wlan show profile name = "'+name+'" key=clear')Save the file with the .py extension. Every time you need to run the file with command line argument, open the cmd first, go to the directory and type the command:python "SSID"Then hit "enter".For more clarification, you can watch this video.
Schedule Demo