-
Notifications
You must be signed in to change notification settings - Fork 3
/
emailHell.py
46 lines (35 loc) · 1.19 KB
/
emailHell.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env python
# encoding: UTF-8
import sys
from smtplib import SMTP_SSL as SMTP
from time import sleep
import config
# This is a sneak preview of the hell I have in store for you :)
def send_email(from_addr, to_addr, body_text):
"""
Send an Email
"""
msg_body = ""
parts = ["From: %s" % config.from_addr,
"To: %s" % config.to_addr,
"MIME-Version: 1.0",
"Content-type: text/html",
"Subject: %s" % subject,
"",
body_text
, "\r\n"]
msg_body = "\r\n".join(parts)
server = SMTP(config.host, 465)
# server.set_debuglevel(1)
server.ehlo()
server.login(config.usrnme,config.pswd)
server.sendmail(from_addr, to_addr, msg_body)
server.quit()
sleep(2)
body_text = 'Hey there! <br/><br/> Next time someone asks you to remove them from an email list<br/><br/> You will remember this moment <br/> Now remove %s from your email list!<br/><br/><br/> Regards,<br/><br/> Pissed off Developer<br/> [From: Address]' % config.from_addr
while True:
for i in range(len(config.victims)):
subject = "Career Inquiry"
config.to_addr = config.victims[i]
send_email(config.from_addr, [config.to_addr], body_text)
print "Sent Message To " + config.victims[i]