From 76d1e52697a0cdd0a1264450e3d463e18fab0ef3 Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Sat, 11 Feb 2017 17:25:24 -0600 Subject: [PATCH] updated instructions --- down-a-notch/description.md | 3 ++- down-a-notch/grader.py | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 down-a-notch/grader.py diff --git a/down-a-notch/description.md b/down-a-notch/description.md index 77fba5f..1a777b6 100644 --- a/down-a-notch/description.md +++ b/down-a-notch/description.md @@ -1 +1,2 @@ -I've spent too long in the high level, let's take the level [down a notch](${check}). Help me find the correct input to this function! \ No newline at end of file +I've spent too long in the high level, let's take the level [down a notch](${check}). Help me find the correct input to this function! +Your answer should be in the format `a:b` where `a` and `b` are integers. Do **not** wrap it with `easyctf{}`. \ No newline at end of file diff --git a/down-a-notch/grader.py b/down-a-notch/grader.py new file mode 100644 index 0000000..1501ec0 --- /dev/null +++ b/down-a-notch/grader.py @@ -0,0 +1,13 @@ +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!"