easyctf-2017/self-modifier/grader.py
John W 23125c60af Added the morphing problem
Along with all of its generation script stuff...
2017-03-11 20:30:25 -06:00

13 lines
445 B
Python

def grade(random, key):
if key.find("Z7a_ok_qfme_xt") != -1:
return True, "Correct!"
incorrect_txt = 'Wrong. '
if key.find("Z7a") == -1:
incorrect_txt += "Phase 1 failed. "
if key.find("_ok_") == -1:
incorrect_txt += "Phase 2 failed. "
if key.find("qfme") == -1:
incorrect_txt += "Phase 3 failed. "
if key.find("_xt") == -1:
incorrect_txt += "Phase 4 failed. "
return False, incorrect_txt