easyctf-2017/down-a-notch/grader.py
2017-02-11 17:25:24 -06:00

13 lines
323 B
Python

def grade(autogen, key):
try:
a, b = map(int, key.split(":"))
c = a ^ b
d = 98 + c
e = ~d + b
f = e ^ a
g = a + b * c / d ^ e + f
if g != -814:
raise Exception("lol")
return True, "Nice!"
except:
return False, "Nope. Keep trying!"