mirror of https://github.com/dirtbags/moth.git
add tokens for netre
This commit is contained in:
parent
20c7582171
commit
0a6f84f483
|
@ -1,6 +1,11 @@
|
||||||
From: The Tracer FIRE Registration Fairy <neale@lanl.gov>
|
From: The Tracer FIRE Registration Fairy <neale@lanl.gov>
|
||||||
To: RCPT
|
To: RCPT
|
||||||
Subject: Tracer FIRE: Your Course Assignment
|
Subject: Tracer FIRE: Your Course Assignment (repeat email)
|
||||||
|
|
||||||
|
This is a repeat email of your course assignment. Some people didn't
|
||||||
|
recieve their assignment on Monday. This should not contain any new
|
||||||
|
information if you've already seen your course assignment.
|
||||||
|
|
||||||
|
|
||||||
Your course assignment is:
|
Your course assignment is:
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,27 @@
|
||||||
#! /usr/bin/python3
|
#! /usr/bin/python3
|
||||||
|
|
||||||
import smtplib
|
import smtplib
|
||||||
|
import sys
|
||||||
|
|
||||||
|
courses = {
|
||||||
|
"net": "Network Archaeology",
|
||||||
|
"mal": "Malware Reverse-Engineering",
|
||||||
|
"hst": "Host Forensics",
|
||||||
|
"icc": "Incident Coordination",
|
||||||
|
"nil": "None",
|
||||||
|
}
|
||||||
|
|
||||||
smtpd = smtplib.SMTP("mail.lanl.gov")
|
smtpd = smtplib.SMTP("mail.lanl.gov")
|
||||||
|
|
||||||
template = open("hubs-mail.txt").read()
|
template = sys.stdin.read()
|
||||||
|
if 'RCPT' not in template:
|
||||||
for line in open("assignments.txt"):
|
print("Pass the template on stdin.")
|
||||||
course, email = line.strip().split()
|
else:
|
||||||
|
for line in open("assignments.txt"):
|
||||||
print(email)
|
course, email = line.strip().split()
|
||||||
msg = template.replace("RCPT", email)
|
coursename = courses[course]
|
||||||
smtpd.sendmail("neale@lanl.gov", [email], msg)
|
|
||||||
|
print(email)
|
||||||
|
msg = template.replace("RCPT", email).replace("COURSE", coursename)
|
||||||
|
smtpd.sendmail("neale@lanl.gov", [email], msg)
|
||||||
|
#print(msg)
|
||||||
|
|
Loading…
Reference in New Issue