pyinstaller 3.2 build pyqt4/python2.7 to onefile exe,不能运行缺少的msvcr100.dll? [英] pyinstaller 3.2 build pyqt4/python2.7 to onefile exe, can not run missing msvcr100.dll?

查看:60
本文介绍了pyinstaller 3.2 build pyqt4/python2.7 to onefile exe,不能运行缺少的msvcr100.dll?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为标题,

构建成功,但exe无法运行.找不到 msvcr100.dll.

Build successful, but the exe can't run. can not found msvcr100.dll.

我可以把msvcr100.dll和exe放在同一个目录下,exe就可以运行了.

I can put msvcr100.dll with exe in the same dir, the exe can run.

但我只想要一个 exe 文件.

But I just want only one exe file.

有人知道怎么做吗?

推荐答案

解决了.这是pyinstaller3.2的一个bug,git中的新版本已经解决了这个bug.在 GitHub 上下载最新的源代码,一切正常.

Has solved. This is a bug of pyinstaller3.2, the new one in the git has solved this bug. Down the newest source in the GitHub, everything works fine.

这是正确的,我无法告诉您该答案对我有多大帮助.我一直在尝试构建一个单独的 exe Exploit 来在 Windows XP 上执行,而不会因为我的 OSCP 实验室/考试而崩溃.我遵循了很多教程,但似乎没有任何效果.我能够构建 EXE,但无法让它在单个 EXE 下运行.

This is correct, I cant tell you how much that answer helped me out. I have been trying to build a single exe Exploit to execute on Windows XP with-out it crashing for my OSCP Labs/Exam. I followed so many tutorials and nothing seems to work. I was able to build the EXE but could not get it to run under a single EXE.

如果任何阅读本文的人都收到此程序无法在 DOS 模式下运行"的提示尝试从具有相同版本 (Windows XP) 的另一台机器上运行它.关于如何使用 Pyinstaller 构建的 EXE 漏洞从生命周期结束的操作系统上的反向 Shell 解决该问题的信息并不多.(大量的试错和决心)

If anyone who reads this is getting "This Program cannot be run in DOS mode" try running it from another machine with the same build (Windows XP). There is not much info out there on how to solve that from a Reverse Shell on a End Of Life Operating System using an EXE exploit built with Pyinstaller. (Lots of Trial and Error and determination)

在任何情况下都需要 Microsoft Visual C++ 2008 Redistributable Package(或一些其他版本,取决于 python 版本),python27.dll 需要它

Microsoft Visual C++ 2008 Redistributable Package (or some other version depending on python version) is needed in any case, python27.dll requires it

从我的构建机器 (WinXP SP2) 上的 GUI 运行时,我也收到了关于 msvcr100.dll 的错误.这在 GitHub 上的 3.3 Dev 版本中得到纠正.我安装了 C++ 2008 包,但是当我重新构建 EXE 时这并没有解决我的问题,3.3 Dev Pyinstaller 是解决方案.

I was also receiving an error about msvcr100.dll when ran from the GUI on my build machine(WinXP SP2). This is corrected in the 3.3 Dev version on GitHub. I installed the C++ 2008 Package but this didn't solve my problem when I re-built the EXE, the 3.3 Dev Pyinstaller was the solution.

压缩 Pyinstaller 3.3 Dev(GitHub) 的 Dev 版本是我能说的 2016 年 11 月 14 日的最新版本.确保您安装了与 (Python 2.7.x) 版本匹配的 Python 2.7.x(我使用了 2.7.11)和 pywin32.(无论是 64 位还是 32 位都重要)使用 setup.py 安装 Pyinstaller,确保您没有安装以前的版本,如果是这样,请使用 pip 等删除.我先安装了 pip,这就是我的全部问题.

Zip down the Dev version of Pyinstaller 3.3 Dev(GitHub) is the newest for 11/14/16 that I could tell. Make sure you have Python 2.7.x (I used 2.7.11) and pywin32 installed that matches (Python 2.7.x) version. (And it does matter if its 64-bit or 32-bit) Use the setup.py to install Pyinstaller, make sure you do not have a previous version already installed, if so use pip or etc. to remove. I installed with pip first and this was my whole issue.

我能够让所有 32 位单一 EXE 漏洞利用在 64 位/32 位 Windows 机器上运行,最高可达 Windows 10.

I was able to get all of my 32-bit Single EXE Exploits to run on 64-bit/32-bit Windows machines up to Windows 10.

一旦完成,请确保 Pyinstaller 在您的 $PATH 中,并按照有关创建 --onefile EXE 的标准教程进行操作.复制到您的 Windows 目标机器,它应该可以正常工作.我不需要拉任何依赖项,但您可能必须在 --hidden 命令中包含一些依赖项.关于如何包含隐藏的 .dll 的 Pyinstaller 文档中非常详细

Once that is completed, make sure Pyinstaller is in your $PATH and follow the standard tutorials on creating a --onefile EXE. Copy to your Windows Target machine and it should work with-out error. I did not need to pull any dependencies over but you may have to include some with the --hidden command. Its greatly detailed in the Pyinstaller documentation on how to include hidden .dlls

如果这仍然对您不起作用,请尝试使用 py2exe.它有点复杂,但你决心你会弄明白.

If this still doesn't work for you try using py2exe. Its a little more complicated but it your determined you will figure it out.

如果你有用 python 2.x.x 和 3.x.x 编写的代码,你可以有多个 Python 环境并在每个环境中安装 Pyinstaller.这也在文档中.

If you have code written in python 2.x.x and 3.x.x you can have multiple environments of Python and have Pyinstaller installed in each. This is in the documentation as well.

谢谢吉姆英.你的两句话回答正是我所需要的.

这篇关于pyinstaller 3.2 build pyqt4/python2.7 to onefile exe,不能运行缺少的msvcr100.dll?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆