Challenge description: “You have 10 characters to get the flag. Have fun!”
Source code of the server:
line = input('>>> ')
flag="[REDACTED]"
if len(line) > 10:
raise Exception()
try:
eval(line)
except:
pass
Obviously, print(flag)
is too long being 11 characters long.
While this challenge had us stumped for a while, we quickly found out that another python builtin was able to print things in a shorter way:
help(flag)
was the solution for this first python jail:
pctf{JusT_a5k_4_h3lP!}