mirror of https://github.com/dirtbags/moth.git
I assigned classes
This commit is contained in:
parent
ae6b9a8b4d
commit
625ebca23c
|
@ -1,11 +1,21 @@
|
||||||
#! /usr/bin/python3
|
#! /usr/bin/python3
|
||||||
|
|
||||||
import sys
|
import smtplib
|
||||||
|
|
||||||
|
smtpd = smtplib.SMTP("mail.lanl.gov")
|
||||||
|
|
||||||
|
courses = {
|
||||||
|
"net": "Network Archaeology",
|
||||||
|
"mal": "Malware Reverse-Engineering",
|
||||||
|
"hst": "Host Forensics",
|
||||||
|
"icc": "Incident Coordination",
|
||||||
|
"nil": "None",
|
||||||
|
}
|
||||||
|
|
||||||
limits = {
|
limits = {
|
||||||
"net": 100,
|
"net": 120,
|
||||||
"mal": 60,
|
"mal": 70,
|
||||||
"hst": 60,
|
"hst": 70,
|
||||||
"icc": 40,
|
"icc": 40,
|
||||||
"nil": 9000,
|
"nil": 9000,
|
||||||
":-(": 9000,
|
":-(": 9000,
|
||||||
|
@ -14,7 +24,10 @@ limits = {
|
||||||
# Read in allowed substring list
|
# Read in allowed substring list
|
||||||
allowed = []
|
allowed = []
|
||||||
for line in open("approved.txt"):
|
for line in open("approved.txt"):
|
||||||
allowed.append(line.strip())
|
line = line.strip()
|
||||||
|
if line:
|
||||||
|
allowed.append(line)
|
||||||
|
template = open("mail.txt").read()
|
||||||
|
|
||||||
# Read in registration data
|
# Read in registration data
|
||||||
registrants = []
|
registrants = []
|
||||||
|
@ -56,8 +69,11 @@ for email in registrants:
|
||||||
oldreg = None
|
oldreg = None
|
||||||
|
|
||||||
if oldreg != w:
|
if oldreg != w:
|
||||||
print(w, email)
|
#msg = template.replace("RCPT", email).replace("COURSE", courses[w])
|
||||||
open(email, "w").write(w)
|
#smtpd.sendmail("neale@lanl.gov", [email], msg)
|
||||||
|
#open(email, "w").write(w)
|
||||||
|
|
||||||
print("%d got 1st choice, %d got 2nd choice, %d got screwed" %
|
#print(w, email, r)
|
||||||
(counts[0], counts[1], counts[2]))
|
|
||||||
|
|
||||||
|
print("%d got 1st choice, %d got 2nd choice, %d got screwed" % (counts[0], counts[1], counts[2]))
|
||||||
|
|
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 807 KiB After Width: | Height: | Size: 788 KiB |
Loading…
Reference in New Issue