Use Python to Check Saved Wi-fi Passwords

August 15, 2017 | Views: 9402

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 filename.py “SSID”

Then hit “enter”.

For more clarification, you can watch this video.

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

  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.

Cybrary On The Go

Get the Cybrary app for Android for online and offline viewing of our lessons.

Get it on Google Play
 

Support Cybrary

Donate Here to Get This Month's Donor Badge

 
Skip to toolbar

We recommend always using caution when following any link

Are you sure you want to continue?

Continue
Cancel