吾爱破解 - 52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 3825|回复: 4
收起左侧

[求助] python逆向反编译报AssertionError,求大佬指点

[复制链接]
xxulin 发表于 2021-8-12 14:05
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
>>>

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

 楼主| xxulin 发表于 2021-8-12 14:18
我帖子为啥看不到了
 楼主| xxulin 发表于 2021-8-12 15:04
 楼主| xxulin 发表于 2021-8-13 09:17
yzswk 发表于 2021-10-23 22:33
看看有没有用,https://blog.csdn.net/lclfans1983/article/details/107255346
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

返回列表

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-11-25 00:37

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表