This was my entry for Phase 1 and 2 of AISandbox.com's Capture the Flag competition.