rev: add already solved challenges

This commit is contained in:
2024-09-01 23:15:27 +02:00
parent 9f5d34fe87
commit b1c7b28af0
5 changed files with 342 additions and 0 deletions

1
rev/transformation/enc Normal file
View File

@@ -0,0 +1 @@
灩捯䍔䙻ㄶ形楴獟楮獴㌴摟潦弸弰摤捤㤷慽

19
rev/transformation/solve.py Executable file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/env nix-shell
#!nix-shell -i python3 -p python3
# enc = ''.join([chr((ord(flag[i]) << 8) + ord(flag[i + 1])) for i in range(0, len(flag), 2)])
def decrypt(enc):
result = []
for x in enc:
n = ord(x)
result.append(chr((n & 0xFF00) >> 8))
result.append(chr(n & 0xFF))
return "".join(result)
if __name__ == "__main__":
with open('enc') as file:
enc = file.read()
print(decrypt(enc))