UnixDroid

Reversing · Medium

Shifty Checker

150 points · 0 solves so far

Medium Reversing 150 pts

This Python program checks whether you know the flag. You don't need to guess it: read the code and work backwards.

SECRET = [85, 69, 125, 117, 55, 123, 57, 121, 123, 58, 120, 114, 107, 125, 135, 70, 120, 65, 128, 144]

def check(password):
    if len(password) != len(SECRET):
        return False
    for i, ch in enumerate(password):
        if ord(ch) + i != SECRET[i]:
            return False
    return True

pw = input("Enter the flag: ")
print("Correct!" if check(pw) else "Nope.")
Need a hint?

Each character was shifted by its position. Subtract i from SECRET[i] and convert with chr().

Log in or create a free account to submit the flag.
← All challenges & leaderboard