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.
  • → Script didn’t work
  • → Script worked

  • Basically what is happening here is we are dividing 3200 with 64 because the data is encoded 50 times.
import base64 

file = open('theflag.txt', 'r')
file_data =

for i in range (50):
 file_data = base64.b64decode(file_data)

flag = file_data.decode('utf-8')
print(f'Flag: {flag}')
Flag: flag{340ff1bee05244546c91dea53fba7642}
Published on : 28 May 2024