Python 如何从 PyInstaller PYZ 文件反编译文件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18303122/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-19 10:26:12  来源:igfitidea点击:

How to decompile files from PyInstaller PYZ file

pythondecompilingpyinstaller

提问by Patrick Burns

I have exe build by pyinstaller, so, i unpack it, and now i want unpack file *.pyz, where containing all script files, but filenames without extensions (only file names and is_packet in tuple True\False). Example files list, where return Zlib

我有 pyinstaller 构建的 exe,所以,我解压它,现在我想要解压文件 *.pyz,其中包含所有脚本文件,但文件名没有扩展名(只有文件名和 is_packet 在元组 True\False 中)。示例文件列表,其中返回 Zlib

BeautifulSoup
ConfigParser
HTMLParser
PyQt4
Queue
StringIO
UserDict
_LWPCookieJar
_MozillaCookieJar
__future__
_abcoll
_strptime
_threading_local

How you can see, files without extensions and all files encrypted. Example this unpacked files: http://www.sendspace.com/file/pky00m

你怎么看,没有扩展名的文件和所有加密的文件。例如这个解压文件:http: //www.sendspace.com/file/pky00m

So, how i can decompile it? Thanks

那么,我该如何反编译呢?谢谢

回答by Extreme Coders

I have written a python scriptwhich will take a pyinstaller generated exe file and extract its contents including the PYZ file and every thing within

我编写了一个python 脚本,它将采用 pyinstaller 生成的 exe 文件并提取其内容,包括 PYZ 文件和其中的所有内容

After using that script use Easy Python Decompilerto decompile the generated pyc files.

使用该脚本后,使用Easy Python Decompiler反编译生成的 pyc 文件。

If you are more interested , I have written a detailed paper on reversing such an application. Here is the link.

如果你更感兴趣,我已经写了一篇关于逆向这样的应用程序的详细论文。链接在这里。

http://tuts4you.com/download.php?view.3541

http://tuts4you.com/download.php?view.3541