Description
I think it's time for a dis.dis()
track...
Attachments
https://imaginaryctf.org/r/7F0C-out.txt
Writeup
The bytecode is fairly easy to read, we see a loop being setup over a constant list that's embedded in the disassembly.
The reconstructed code is:
def f(n):
for x in [0, 6, -17, 14, -21, 25, -23, 5, 15, 2, -12, 11, -1, 6, -4, -12, -6, 9, 8, 5, -3, -3, 6, -6, 4, -18, -6, 26, -2, -18, 20, -17, -9, -4]:
n -= x
print(chr(n), end="")
print()
We can either simulate it ourselves, or reconstruct it, then knowing the flag format, simply pass in ord("i")
as argument and read off the flag.
Flag
ictf{bytecode_could_be_easy_as_py}