2016-10-28 20:00:59 +00:00
|
|
|
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)
|
2017-03-16 23:26:54 +00:00
|
|
|
flag = "".join([autogen.choice("0123456789abcdef") for i in range(32)])
|
2016-10-28 20:00:59 +00:00
|
|
|
if answer.find(flag) != -1:
|
|
|
|
return True, "Correct!"
|
2017-03-16 23:22:27 +00:00
|
|
|
return False, "Nope, try again."
|