HTB CyberApocalypse Makeshift Writeup
Given:
source.py
1
2
3
4
5
6
7
8
9
10
11
12
from secret import FLAG
flag = FLAG[::-1]
new_flag = ''
for i in range(0, len(flag), 3):
new_flag += flag[i+1]
new_flag += flag[i+2]
new_flag += flag[i]
print(new_flag)
output.txt
1
!?}De!e3d_5n_nipaOw_3eTR3bt4{_THB
running the same program with the encrypted text gives us the flag
Solution:
1
2
3
4
5
6
7
8
9
10
11
12
FLAG = "!?}De!e3d_5n_nipaOw_3eTR3bt4{_THB"
flag = FLAG[::-1]
new_flag = ''
for i in range(0, len(flag), 3):
new_flag += flag[i+1]
new_flag += flag[i+2]
new_flag += flag[i]
print(new_flag)
Flag:
HTB{4_b3tTeR_w3apOn_i5_n3edeD!?!}
This post is licensed under CC BY 4.0 by the author.