Use Python to Check Saved Wi-fi Passwords

August 15, 2017 | Views: 10936

Begin Learning Cyber Security for FREE Now!

FREE REGISTRATIONAlready a Member Login Here

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, os

name = 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.

Share with Friends
Use Cybytes and
Tip the Author!
Share with Friends
Ready to share your knowledge and expertise?
  1. Hello! These works on Windows but in Unix how can I do the same thing?

  2. hello do an english version cant get what you are saying

  3. Please do an English video clip. Nice article though

  4. Useful article.
    I read only the text, I didn’t watch the videos, as I don’t know Hindi.

  5. He bro if you are there to publish a video in Hindi , truly i personaly i am not satisfied,Please not all of us understand Hindi , next time publish your video in English, ok

Comment on This

You must be logged in to post a comment.

Our Revolution

We believe Cyber Security training should be free, for everyone, FOREVER. Everyone, everywhere, deserves the OPPORTUNITY to learn, begin and grow a career in this fascinating field. Therefore, Cybrary is a free community where people, companies and training come together to give everyone the ability to collaborate in an open source way that is revolutionizing the cyber security educational experience.

Support Cybrary

Donate Here to Get This Month's Donor Badge



Is Linux Worth Learning in 2020?
Views: 742 / December 14, 2019
How do I Get MTA Certified?
Views: 1314 / December 12, 2019
How much does your PAM software really cost?
Views: 1751 / December 10, 2019
How Do I Get into Android Development?
Views: 2141 / December 8, 2019

We recommend always using caution when following any link

Are you sure you want to continue?