Base3200 Writeup
Nahamcon 2024
Solved by: Legend
-
We are given
theflag.xz
file which is used for high compression. -
The compressed file contains a file named
theflag
which contains a very long encoded string. -
At first I thought it was just
base64
with very long string but it was not getting decoded. - I googled and found past CTF on this.
- http://dann.com.br/3dsctf-2016-misc100-base3200/ → Script didn’t work
-
https://ctf-writeup.blogspot.com/2016/12/3ds-ctf.html → Script worked
- Basically what is happening here is we are dividing
3200
with64
because the data is encoded50
times.
import base64
file = open('theflag.txt', 'r')
file_data = file.read()
for i in range (50):
file_data = base64.b64decode(file_data)
flag = file_data.decode('utf-8')
print(f'Flag: {flag}')
Flag: flag{340ff1bee05244546c91dea53fba7642}