Crypt1c_0bFuSc4t10n

Downloading Challenge Files

here is the executable file to download

in this challenge we are given a python encryption algorithm and the encrypted flag

this encryption algorithm encryptes character by character so we can bruteforce it to get the flag

for exemple the first encrypted character is A we will try to bruteforce all ascii characters until we find the character that if encrypted gives us A so this character is the first character of the flag and doing this for each character in the encrypted flag we get the decrypted flag

#!/usr/bin/python3

def obfuscate(text):
    obfuscated = ""
    for char in text:
        if ord(char) % 2 == 0:
            obfuscated += chr(ord(char) ^ 5)
        elif ord(char) % 3 == 0:
            obfuscated += chr(ord(char) ^ 7)
        else:
            obfuscated += chr(ord(char) ^ 3)
    return obfuscated

output = r"ABCBKPZP|5gcVp@bQ25k\d1k\g4\w41iiz\1kk5z2kd\Q5\a41i\P2qm\?-~"
flag =""
for letter in output:
    for i in range(0,256):
        obf_char = obfuscate(chr(i))
        if obf_char == letter:
            flag += chr(i)
            break

print(flag)

Greetings from Sayonara

Last updated

Was this helpful?