Python 3 Script to Fetch Saved Internet Wi-Fi SSD's & Passwords & Display it in Terminal on Windows
14 views
Jun 3, 2025
Get the full source code of application here: https://gist.github.com/gauti123456/3a7af9b998fa50f8ea98ac18e0dd7075
View Video Transcript
0:00
uh hello guys welcome to this video so
0:02
in this video I'll show you a Python
0:04
script which will fetch all your saved
0:06
internet Wi-Fi passwords on your machine
0:09
and display it in the terminal so
0:11
sometimes whenever you are asking for or
0:14
entering your password you can forget
0:16
your password inside your uh Wi-Fi
0:18
network so this script Python script
0:20
will be very much useful it will display
0:23
all the passwords whenever you run the
0:25
script so if I run this script right
0:27
here you will see it will scan your
0:30
Wi-Fi SSIDs inside your laptop and it
0:33
will display all the passwords so in
0:36
this easy way you can see the passwords
0:38
and login so you can see
0:41
that so we have the SSID followed by the
0:45
password authentication everything it
0:47
will be displayed on your respective
0:50
machines
0:52
so so this is really uh useful Python
0:55
script because sometimes you can forget
0:57
passwords so it will display all the
0:59
passwords that you have entered inside
1:01
your
1:02
machine so for doing this we don't need
1:06
any sort of third party module so I have
1:08
given the script in the description of
1:10
this
1:11
video so now let me show you step by
1:14
step how to do this
1:17
so for building this we need two modules
1:22
right here first of all the subprocess
1:28
module and also we need to import the
1:31
regular expression module as well
1:36
so after
1:38
that we need to define some custom
1:42
methods so inside our main method we
1:46
just need to get the
1:49
profiles for this we will define a get
1:52
save Wi-Fi profiles
1:58
method so now for getting the saved
2:01
Wi-Fi profiles we will define this
2:04
function
2:12
so inside this function uh what we need
2:14
to do it is little bit complicated you
2:16
just need to define a variable result
2:19
and this subprocess we will use this
2:21
module and run the very simple
2:24
command this net s command so in double
2:28
quotes w lan show you can even
2:34
uh execute these commands manually
2:36
inside command prompt so what we are
2:38
doing we are executing a series of
2:41
commands programmatically inside a
2:43
Python script so you don't need to
2:44
manually go to command line and execute
2:46
these commands so it is executing these
2:49
commands you can see a series of
2:51
commands right here and uh when you run
2:54
this Python script it will run
2:57
this
3:01
so it will get that total number of
3:04
profiles right here we will see after
3:07
that to store these profiles we use the
3:10
regular expression and we use this find
3:13
all
3:16
method so all user profiles will be
3:18
scanned by using this command and will
3:21
be displayed
3:29
so so after we get these profiles now
3:33
the job has become very easy so let me
3:36
just print these profiles
3:40
so if you run this Python
3:47
script so after doing this we need to
3:51
get the details of each profile
3:59
so for this we can actually run a simple
4:02
uh for loop for each
4:06
profile in
4:08
profiles we can get the details of each
4:11
profile for this we will define a simple
4:14
method custom
4:19
function so here we define this function
4:22
which is get Wi-Fi details
4:26
so each profile these details will be
4:29
the actual SSID name password
4:32
authentication
4:33
everything so this is little bit
4:35
complicated function so let me just
4:37
paste it and explain
4:44
you so it actually takes the profile and
4:47
you can see at last it is returning this
4:50
object which contains four properties
4:52
the SSID name which is your Wi-Fi name
4:54
then the password then the
4:55
authentication and the encryption so it
4:57
returns this object from this
5:00
function and
5:04
uh now we can actually display this
5:07
right in the command line
5:12
so so we are printing these details here
5:14
which is SSID password authentication
5:16
encryption so if
5:18
I you do need to run this so just make
5:22
sure that you run this function
5:33
so once you run this function uh just
5:38
you will see it will scan all your Wi-Fi
5:40
SSIDs and display all the details right
5:45
here you can
5:48
see so in this easy way guys you can
5:51
actually
5:53
uh scan the profiles and get
5:57
details such as such as password SSID
6:00
authentication name using this Python
6:02
script the script I have given in the
6:04
description of this video and uh thank
6:06
you very much for watching this video
6:08
and also check out my website free media
6:10
tools.com uh which contains thousands of
6:13
tools
#Computers & Electronics
#Programming
#Scripting Languages