好友
阅读权限 10
听众
最后登录 1970-1-1
70 吾爱币
发不了图片,就是用uncompyle6执行反编译的时候报了assert 0 <= argc <= 2 AssertionError,然后在python交互式界面中用dis.dis(obj),报argval = name_list[name_index] IndexError: tuple index out of range,求大佬指点
1. uncompyle6报错如下:
[root@localhost work]#
[root@localhost work]# python3 /usr/local/python3/lib/python3.7/site-packages/uncompyle6/bin/uncompile.py -o untest2.py 1.pyc
Traceback (most recent call last):
File "/usr/local/python3/lib/python3.7/site-packages/uncompyle6/bin/uncompile.py", line 265, in <module>
main_bin()
File "/usr/local/python3/lib/python3.7/site-packages/uncompyle6/bin/uncompile.py", line 194, in main_bin
**options)
File "/usr/local/python3/lib/python3.7/site-packages/uncompyle6/main.py", line 324, in main
do_fragments,
File "/usr/local/python3/lib/python3.7/site-packages/uncompyle6/main.py", line 222, in decompile_file
do_fragments=do_fragments,
File "/usr/local/python3/lib/python3.7/site-packages/uncompyle6/main.py", line 141, in decompile
co, out, bytecode_version, debug_opts=debug_opts, is_pypy=is_pypy
File "/usr/local/python3/lib/python3.7/site-packages/uncompyle6/semantics/pysource.py", line 2573, in code_deparse
co, code_objects=code_objects, show_asm=debug_opts["asm"]
File "/usr/local/python3/lib/python3.7/site-packages/uncompyle6/scanners/scanner37.py", line 42, in ingest
tokens, customize = Scanner37Base.ingest(self, co, classname, code_objects, show_asm)
File "/usr/local/python3/lib/python3.7/site-packages/uncompyle6/scanners/scanner37base.py", line 209, in ingest
bytecode = self.build_instructions(co)
File "/usr/local/python3/lib/python3.7/site-packages/uncompyle6/scanner.py", line 132, in build_instructions
self.insts = self.remove_extended_args(list(bytecode))
File "/usr/local/python3/lib/python3.7/site-packages/xdis/bytecode.py", line 234, in get_instructions_bytes
argrepr = opc.opcode_arg_fmt[opc.opname[op]](arg)
File "/usr/local/python3/lib/python3.7/site-packages/xdis/opcodes/opcode_37.py", line 121, in format_RAISE_VARARGS
assert 0 <= argc <= 2
AssertionError
[root@localhost work]#
[root@localhost work]#
2. dis.dis(obj)报错如下:
>>>
>>>
>>> dis.dis(ooo)
2 0 NOP
>> 2 EXTENDED_ARG 19
>> 4 JUMP_FORWARD 5024 (to 5030)
>> 6 NOP
3 >> 8 EXTENDED_ARG 0
>> 10 LOAD_CONST 75 (56108992)
12 NOP
>> 14 EXTENDED_ARG 0
>> 16 STORE_FAST 0 (___<zone>___)
>> 18 NOP
>> 20 EXTENDED_ARG 31
4 >> 22 JUMP_ABSOLUTE 8106
>> 24 LOAD_BUILD_CLASS
>> 26 BUILD_MAP_UNPACK_WITH_CALL 53
>> 28 YIELD_VALUE
5 >> 30 JUMP_ABSOLUTE 37
>> 32 BINARY_XOR
>> 34 WITH_CLEANUP_START
>> 36 BUILD_MAP_UNPACK_WITH_CALL 110
6 >> 38 BUILD_SET_UNPACK 20
>> 40 BUILD_TUPLE 18
>> 42 BUILD_TUPLE 31
>> 44 GET_ANEXT
7 >> 46 MAP_ADD 6
>> 48 INPLACE_MULTIPLY
>> 50 DELETE_NAME 42 (O0O)
>> 52 UNPACK_EX 101
8 >> 54 RETURN_VALUE
>> 56 BUILD_SLICE 25
>> 58 STORE_SUBSCR
>> 60 BUILD_SET_UNPACK 89
9 >> 62 YIELD_FROM
>> 64 IMPORT_FROM 19 (md5)
>> 66 SETUP_FINALLY 77 (to 145)
>> 68 BINARY_MODULO
10 >> 70 BINARY_ADD
>> 72 INPLACE_MATRIX_MULTIPLY
>> 74 MAP_ADD 2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/python3/lib/python3.7/dis.py", line 70, in dis
_disassemble_recursive(x, file=file, depth=depth)
File "/usr/local/python3/lib/python3.7/dis.py", line 360, in _disassemble_recursive
disassemble(co, file=file)
File "/usr/local/python3/lib/python3.7/dis.py", line 357, in disassemble
co.co_consts, cell_names, linestarts, file=file)
File "/usr/local/python3/lib/python3.7/dis.py", line 390, in _disassemble_bytes
line_offset=line_offset):
File "/usr/local/python3/lib/python3.7/dis.py", line 340, in _get_instructions_bytes
argval, argrepr = _get_name_info(arg, cells)
File "/usr/local/python3/lib/python3.7/dis.py", line 294, in _get_name_info
argval = name_list[name_index]
IndexError: tuple index out of range
>>>
我来回答