Get any Wifi Password

Nitesh Virothi
2 min readJan 23, 2021

Ever forgot your wifi password or wanted to know that of the ones that are previously connected to your system. If yes then let's get started all you need is a working system with pycharm and some commands to work on, note this only works, for the wifi connections that are atleast once connected to your system, by using this article you can get this done. So we can do this using a python library called subprocess that helps you to get the password of previously connected wifi, this is used to run a new set of programs and also applications through python code by creating new processes, that can be used to get the input, output or errors. First, install the module subprocess just go to cmd and type pip install subprocess or pip install subprocess.run for windows once subprocess is installed import it using import subprocess.

There are two important commands that are used in this process type or copy this in cmd netsh wlan show profile — This command is used to show the profiles of all wifi connections that are previously been connected to the system. Then, type or copy paste this in cmd
Netsh wlan show profile name=”Wi-F name” key=clear - This command is used to get the password of the wifi you want to know, just type the wifi connection name in the place of wifi name field make sure key=clear so that password is quite clear in text format. Once the command runs you can see a variety of details regarding that particular profile, scroll down to find the Security Settings where you can find an attribute called Key content, next to that you can find a text which is the password of the profile you are looking for. If you want to look for the code you can find it here with an explanation.

If you have any issues or errors at any phase in the process feel free to reach me here https://www.linkedin.com/in/nitesh-virothi-470378187/ . or comment below.

--

--