-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwifipassword.py
More file actions
21 lines (17 loc) · 823 Bytes
/
wifipassword.py
File metadata and controls
21 lines (17 loc) · 823 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#This is a standalone script
import os
def Magic(ssidName):
password = str(os.popen("netsh wlan show profile " + ssidName + " key=clear").readlines())
if ('[\'Profile "{}" is not found on the system.\\n\']'.format(ssidName)) in password:
print("Oh Darling Sorry!! But I don't remember you've ever connected to that network", end="")
else:
starting = password.find("Key Content : ") + 25
ending = password.find("Key Content : ") + 25 + 64
for i in range(starting, ending):
if password[i:i + 12] != "\\n', '\\n', '":
print(password[i], end="")
else:
break
print('\n')
for x in range(5):
Magic(str(input("Hi!! You can ask me the password of any saved wifi network : ")))