Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- import smtplib, string
- import os, time
- os.system("/etc/init.d/sendmail start")
- time.sleep(4)
- HOST = "localhost"
- SUBJECT = "Email from spoofed sender"
- TO = "[email protected]"
- FROM = "[email protected]"
- TEXT = "Message Body"
- BODY = string.join((
- "From: %s" % FROM,
- "To: %s" % TO,
- "Subject: %s" % SUBJECT,
- "",
- TEXT
- ), "\r\n")
- server = smtplib.SMTP(HOST)
- server.sendmail(FROM, [TO], BODY)
- server.quit()
- time.sleep(4)
- os.system("/etc/init.d/sendmail stop")
Add Comment
Please, Sign In to add comment