On 2016-04-07, Jon Ribbens <jon+use...@unequivocal.co.uk> wrote: > I've put an example script here: > > https://github.com/jribbens/unsafe/blob/master/unsafe.py > > When run as a script, it will execute whatever Python code you pass it > on stdin. > > If anyone can break it (by which I mean escape from the sandbox, > not make it use up all the memory or go into an infinite loop, > both of which are trivial) then I would be very interested.
I've updated the script a bit, to fix a couple of bugs, to add back in 'with' and 'import' (of white-listed modules) and to add a REPL mode which makes experimenting inside the sandbox easier. I'm still interested to see if anyone can find a way out of it ;-) -- https://mail.python.org/mailman/listinfo/python-list