easyctf-2017/wayward-space-junk/grader.py
2016-10-28 15:00:59 -05:00

13 lines
No EOL
442 B
Python

def generate(random):
key = "".join([random.choice("0123456789abcdef") for i in range(32)])
return dict(variables={
"key": key
})
def grade(autogen, answer):
key = "".join([autogen.choice("0123456789abcdef") for i in range(32)])
autogen.seed("super%secretkeylalalala" % key)
flag = "".join([random.choice("012456789abcdef") for i in range(32)])
if answer.find(flag) != -1:
return True, "Correct!"
return False, "Nope, try again."