rev: add already solved challenges
This commit is contained in:
1
rev/transformation/enc
Normal file
1
rev/transformation/enc
Normal file
@@ -0,0 +1 @@
|
||||
灩捯䍔䙻ㄶ形楴獟楮獴㌴摟潦弸弰摤捤㤷慽
|
19
rev/transformation/solve.py
Executable file
19
rev/transformation/solve.py
Executable 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))
|
Reference in New Issue
Block a user