extremecoders-re / pyinstxtractor

PyInstaller Extractor
GNU General Public License v3.0
2.94k stars 612 forks source link

jump_back_index = self.offset2tok_index[jump_target] #19

Closed leejshades closed 3 years ago

leejshades commented 3 years ago

PS C:\git\ActiveIQManager0603> uncompyle6 .\ActiveIQHealthManager.exe_extracted\ActiveIQHealthManager.pyc

uncompyle6 version 3.7.4

Python bytecode 3.8 (3413)

Decompiled from: Python 2.7.18 (v2.7.18:8d21aa21f2, Apr 20 2020, 13:25:05) [MSC v.1500 64 bit (AMD64)]

Warning: this version of Python has problems handling the Python 3 "byte" type in constants properly.

Embedded file name: ActiveIQHealthManager.py

Compiled at: 1995-09-28 00:18:56

Size of source mod 2**32: 272 bytes

Traceback (most recent call last): File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main "main", fname, loader, pkg_name) File "c:\python27\lib\runpy.py", line 72, in _run_code exec code in run_globals File "C:\Python27\Scripts\uncompyle6.exe__main__.py", line 7, in File "c:\python27\lib\site-packages\uncompyle6\bin\uncompile.py", line 194, in main_bin **options) File "c:\python27\lib\site-packages\uncompyle6\main.py", line 324, in main do_fragments, File "c:\python27\lib\site-packages\uncompyle6\main.py", line 222, in decompile_file do_fragments=do_fragments, File "c:\python27\lib\site-packages\uncompyle6\main.py", line 141, in decompile co, out, bytecode_version, debug_opts=debug_opts, is_pypy=is_pypy File "c:\python27\lib\site-packages\uncompyle6\semantics\pysource.py", line 2643, in code_deparse deparsed.gen_source(deparsed.ast, co.co_name, customize) File "c:\python27\lib\site-packages\uncompyle6\semantics\pysource.py", line 2461, in gen_source self.text = self.traverse(ast, is_lambda=is_lambda) File "c:\python27\lib\site-packages\uncompyle6\semantics\pysource.py", line 426, in traverse self.preorder(node) File "c:\python27\lib\site-packages\uncompyle6\semantics\pysource.py", line 404, in preorder super(SourceWalker, self).preorder(node) File "c:\python27\lib\site-packages\spark_parser\ast.py", line 117, in preorder self.preorder(kid) File "c:\python27\lib\site-packages\uncompyle6\semantics\pysource.py", line 404, in preorder super(SourceWalker, self).preorder(node) File "c:\python27\lib\site-packages\spark_parser\ast.py", line 110, in preorder func(node) File "c:\python27\lib\site-packages\uncompyle6\semantics\pysource.py", line 1448, in n_classdef self.n_classdef36(node) File "c:\python27\lib\site-packages\uncompyle6\semantics\customize36.py", line 230, in n_classdef36 self.build_class(subclass_code) File "c:\python27\lib\site-packages\uncompyle6\semantics\pysource.py", line 2437, in build_class self.gen_source(ast, code.co_name, code._customize) File "c:\python27\lib\site-packages\uncompyle6\semantics\pysource.py", line 2461, in gen_source self.text = self.traverse(ast, is_lambda=is_lambda) File "c:\python27\lib\site-packages\uncompyle6\semantics\pysource.py", line 426, in traverse self.preorder(node) File "c:\python27\lib\site-packages\uncompyle6\semantics\pysource.py", line 404, in preorder super(SourceWalker, self).preorder(node) File "c:\python27\lib\site-packages\spark_parser\ast.py", line 117, in preorder self.preorder(kid) File "c:\python27\lib\site-packages\uncompyle6\semantics\pysource.py", line 404, in preorder super(SourceWalker, self).preorder(node) File "c:\python27\lib\site-packages\spark_parser\ast.py", line 110, in preorder func(node) File "c:\python27\lib\site-packages\uncompyle6\semantics\customize35.py", line 215, in n_function_def self.default(node) File "c:\python27\lib\site-packages\uncompyle6\semantics\pysource.py", line 2181, in default self.template_engine(table[key.kind], node) File "c:\python27\lib\site-packages\uncompyle6\semantics\pysource.py", line 2087, in template_engine self.preorder(node[index]) File "c:\python27\lib\site-packages\uncompyle6\semantics\pysource.py", line 404, in preorder super(SourceWalker, self).preorder(node) File "c:\python27\lib\site-packages\spark_parser\ast.py", line 110, in preorder func(node) File "c:\python27\lib\site-packages\uncompyle6\semantics\pysource.py", line 870, in n_mkfunc self.make_function(node, is_lambda=False, code_node=code_node) File "c:\python27\lib\site-packages\uncompyle6\semantics\pysource.py", line 887, in make_function make_function36(self, node, is_lambda, nested, code_node) File "c:\python27\lib\site-packages\uncompyle6\semantics\make_function36.py", line 160, in make_function36 scanner_code = Code(code, self.scanner, self.currentclass) File "c:\python27\lib\site-packages\uncompyle6\scanner.py", line 97, in init self._tokens, self._customize = scanner.ingest(co, classname) File "c:\python27\lib\site-packages\uncompyle6\scanners\scanner38.py", line 103, in ingest jump_back_index = self.offset2tok_index[jump_target] KeyError: 1830 PS C:\git\ActiveIQManager0603>

extremecoders-re commented 3 years ago

These is related to uncompyle6 not pyinstxtractor. You can try decompile3 if uncompyle6 doesn't work.

leejshades commented 3 years ago

thx. i have try to use decompile3,but It's half done. my pyc file https://github.com/leejshades/ActiveIQHealthManager/blob/master/ActiveIQHealthManager.pyc

leejshades commented 3 years ago

image

extremecoders-re commented 3 years ago

Support for recent versions of Python in both uncompyle6 and decompile3 is not complete. Instead of de-compiling you can try to read the disassembled code.