#!/bin/bash
echo "Enter your name: "
read submitters_name
echo "Enter your email address: "
read submitters_email
echo "Enter your second partner's name (blank if none): "
read part_name
echo "Enter your second partner's email address (blank if none): "
read part_email
echo "Enter your third partner's name (blank if none): "
read part2_name
echo "Enter your third partner's email address (blank if none): "
read part2_email

echo "Enter secret codes below found in /calnet*/code. Please include in the format 'email:code', without quotes.\n"
echo "Enter code1:"
read code1
echo "Enter code2:"
read code2
echo "Enter code3:"
read code3

rm submission.txt > /dev/null 2>&1
echo "name: $submitters_name" > submission.txt
echo "email: $submitters_email" >> submission.txt
echo "pname: $part_name" >> submission.txt
echo "pemail: $part_email" >> submission.txt
echo "p2name: $part2_name" >> submission.txt
echo "p2email: $part2_email" >> submission.txt
echo "code1: $code1" >> submission.txt
echo "code2: $code2" >> submission.txt
echo "code3: $code3" >> submission.txt
echo `date` >> submission.txt

echo ""
echo "Done writing to submission.txt"
echo "Please submit submission.txt, along with a tar.gz file of your source file. Please test and make sure that"
echo "your exploits BUILD CLEANLY and WORK CORRECTLY on a fresh VM Image. Really, please take the time to make sure."
echo "Do not forget to include explanation[1-3].txt."
echo "Remember! EACH partner is resposible for 1) submitting solutions; 2) writing up in their own words how they arrived at a solution."
echo "Please check the format of the file and *ensure* you have not made any typos"
echo "If there are any issues, please post them to the message board"
