pyinstaller 3.2 build pyqt4/python2.7 to onefile exe, can not run missing msvcr100.dll? - python-2.7

As title,
Build successful, but the exe can't run. can not found msvcr100.dll.
I can put msvcr100.dll with exe in the same dir, the exe can run.
But I just want only one exe file.
Anyone know how to do?

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

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.
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.
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 (or some other version depending on python version) is needed in any case, python27.dll requires it
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.
What I did was:
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.
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.
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
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.
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.
Thank you jim ying. Your 2 sentence answer was exactly what I needed.

Related

Cannot get started with Vpython

I am a new to python. I am have installed Python27 and Vpython on my windows 64-bit W8.1 laptop.
The python version was Py27 32-bits and Vpython 32-bits. After installation I thought I could directly run an example program from the VIDLE (File -> Open -> bounce). But I realized there is lot more to install to get this working.
So I googled the errors and found that I has to install Numpy and WxPython which I was able to complete successfully. But now I have this error shown below
"The Polygon module is not installed,
so the text and extrusion objects are unavailable.
The ttfquery and/or FontTools modules are not installed,
so the text object is unavailable."
I googled for this but was not able to arrive at anything.
Should I install Polygon module, FontTools and ttfquery module?
I was not able to fond a proper link to do any of the above. Kindly help me out. I have a hit a wall.
Thanks!!
Hopefully was able to solve the issue.
The problem was with the way how I installed Vpython. I should have accidentally selected "custom installation" instead of "full installation".
Also the version of numpy that comes with default set-up did not support for me. Hence I used the pip to update the version and now everything is up and running.
I am able to get the example programs to work.
Also the 64-bit version is not working still. So its always safe to stick on to 32-bit version even if your machine is 64-bit
You're working with an older version of VPython that is no longer supported. See the first page of vpython.org.

GDB on NetBeans 8.2 not starting (Windows)

I've successfully installed NetBeans 8.2 on my system. I've also installed MinGW and MSYS to make it compile C/C++ projects and it works flawlessly. The problem is that whenever I try to debug a program it gives me two errors:
Selected console type is not supported in your configuration, using
External terminal instead
and
GDB has unexpectedly stopped with return -1.073.741.701
and GDB is stuck loading until i press Cancel.
I noticed that if I go to C:\MinGW\bin\gdb.exe it says that the application cannot be started (Error code: 0xc00007b).
Maybe that's because I followed the official tutorial for installing MinGW and MSYS, but I wasn't able to install GDB correctly because point 15 says:
Unzip the gdb-7.0-2-mingw32-bin.tar.gz to your C:\MinGW directory so
that the gdb executable is installed into your C:\MinGW\bin directory.
but if I unzip the files, there are bin and share directories (which overlap with the existing ones), so I chose to cancel.
I could have found the issue, but I'm not sure. I ran Dependency Walker on gdb.exe and it reds out ZLIB1.DLL and KERNEL32.DLL. Do I need the 32-bit version of them? If so, where can I find the downloads?
Screenshot:
Not unzipping the files is almost definitely the problem. There is probably a dependency that doesn't, causing a runtime error.
Problem solved: as I mentioned in my edit, the problem was the 64-bit version of ZLIB1.dll, so I downloaded the 32-bit version and put it inside C:\MinGW\bin. Now everything works perfectly. Thanks to #bremen_matt for suggesting me that it was a dependency issue.

Fixing MinGW Installation on Windows 8

While helping my friend spin up MinGW and a C++ environment on his Windows 8 computer, I ran the get-mingw script and waited as it ran through all the mirrors for required downloads. However, three downloads completely failed:
libltdl - installer script hung and then moved on after pressing "OK"
automake-1.11 - installer script tried finding 1.10, then 1.9, then 1.8, then 1.7 (all of which failed) until finally settling on 1.6
mktemp - script hung and moved on after pressing "OK"
In all three cases, the script gave me a nice error log upon completion, showing that a majority of packages had been downloaded and installed except for these three, which showed up as errors. However during the installation process I had simply gone to the MinGW sourceforge page and manually found and downloaded each .bin.tar.lzma file that was missing.
Now that I have them, is there a good accepted way to unpack and plug them into my friend's existing MinGW install? In case it's tough, I'm comfortable with unix and dos command line so I'll be able to move executables into the MinGW/bin folder if that's what's needed, I just want to check for the best way to 'fix' the install.
As a side note - even though the error log says these are required packages, adding MinGW/bin/ to the PATH still allows for use of gcc and g++, although not make (possibly because of automake failure?). Is this standard behavior?
Firstly, the package issue can be fixed by using the MinGW installer - keep the packages selected and go to "apply changes" and the script will probably try to redownload the missing packages. I think the original problem was probably just a shoddy wifi connection during repository connection.
However, I then ran into a problem where I tried to run gcc and it gave me a missing -lpthread error ... but this question was able to help me fix that, and gcc and g++ are working fine now (haven't opened and tested Eclipse yet though). Just in case of link decay, the issue I cited arises from the MinGW installer script not downloading the lpthread library upon installation. To fix that issue, quoted from link:
Just run and open MinGW Installation Manager, which should be pre-installed with MinGW, select "All Packages" on the left panel, and on the right panel, search for "mingw32-pthreads-w32" packages and install them.
I think the Installation Manager has libpthread and pthread available for install, and pthread libs were the ones that seemed to solve it for me.

Having trouble getting Python to recognize location of vcvarsall.bat

I was trying to install RandomWords which requires ujson, at some point in the installation I received the following notification: "error: Unable to find vcvarsall.bat" I searched here, on stackoverflow, and came across some answers as the to root of this problem. In this answer https://stackoverflow.com/a/8705722, near the end, the OP pointed out that Microsoft had released a C++ compiler package for Python 2.7 (http://www.microsoft.com/en-us/download/details.aspx?id=44266).
I installed this package but still haven't had any success in installing ujson. So far I've tried the following:
Adding the location of vcvarsall.bat to the path environment variable
Manually tried loading the VC++ compiler's environment into the session by executing vcvars64.bat (aI've tried vcvars32.bat as well) as recommended here: https://stackoverflow.com/a/18045219
I've also tried installing the compilers found in "Windows SDK for Windows 7 and .NET Framework 3.5 SP1" found here: http://www.microsoft.com/en-us/download/details.aspx?id=3138
Not sure where to go from here, any suggestions/help would be greatly appreciated.
For reference here's some relevant specs:
Windows 8.1 (64-bit)
Python 2.7 (64-bit)
I've been trying to install said package using pip from the command prompt (e.g. '> pip install ujson')
I've uninstalled all the C++ compiler packages I've tried except this one: http://www.microsoft.com/en-us/download/details.aspx?id=44266
Really don't feel like installing mingw, but I'll try it if it seems like it's the only solution.
-UPDATE-
I ended up modifying "msvc9compiler.py" and manually setting the location of vcvarsall.bat by setting the value of the vcvarsall variable to the location of that batch file. Everything compiled fine but this is not a recommended solution. I'm pretty sure the compiler version I have matches the one python 2.7 uses, but as mentioned in an answer, in another question on this topic, if these don't match it can cause problems since "the compilers will probably have incompatible C runtime libraries."

Has anyone ever successfully compiled Vowpal Wabbit on a Windows 7 machine?

I am trying to compile Vowpal Wabbit on a Windows 7 machine and after trying Netbeans, Cygwin, and MinGW I'm starting to wonder if I'm trying something that's even feasible.
Each of the above has required **.h files that aren't designed for windows such as sys/socket.h.
Anyone that has actually done this, I would appreciate any suggestions.
Run cygwin's setup.exe, type "boost", click on "Default" several times until it changes to "Install", proceed with installing boost library from cygwin.
Download latest Vowpal Wabbit and extract to you vw directory.
Open cygwin and go to that vw directory, where Makefile is(cd .. (see #home) cd vw_dir)
In cygwin command prompt type "make"
After that you can close cygwin, and use cmd to run vowpal.
I took this from a kaggle forum:
"
I managed to compile VW under Windows 7 64 bit without Professional Visual Studio 2010.
You can do it by using Cygwin ( http://www.cygwin.com/ ).
first of all install Cygwin on your computer: just choose the standard configuration
run Cygwin shell and enter : git clone git://github.com/JohnLangford/vowpal_wabbit.git
after the download have completed write: cd vowpal_wabbit
at this point you can run the command: configure
the configure procedure will point out all the libraries which are missing from your system and that you should install by running again the Cygwin setup
after some iterations of point 5 you will have finally provided all the necessary libraries to Cygwin, and you can run the command: make
7 after the compiler will finish the make of vw.exe, run: make test in order to check if everything is all right with your build.
Now you can start using VW under Windows, just open a shell and try it.
"
Another update, binary releases for Windows is now available since 21 June 2016. The latest link as of today is: https://github.com/eisber/vowpal_wabbit/releases/tag/v8.2.0.6
It's available in MSI installer file.
(In case you encounter dead link in the future, please find most recent version from the eisber's github repo.)
John Langford recently made a post to the VW mailing list saying a Windows port was in progress, but still broken in certain respects. I would suspect that it currently is not possible to get VW running on windows (but I haven't actually tried)
From this thread:
Chris Quirk created a windows port for VW, which is now in the
distribution. It's still incomplete: networking and threads are
problem points.
I managed to build on 64bit win without cygwin, native windows. Took a long time to set up env for the build so I wrote a blog about it. I know that self promotion is frowned upon but this link has the binary I built on my machine, guaranteed to work on only my machine but anyone is free to try it out.
An update for curious googlers: the VW Windows instructions have recently been updated, and if you get the most recent source you should be able to compile on Visual Studio without major hurdles (I have tried successfully): https://github.com/JohnLangford/vowpal_wabbit/blob/master/README.windows.txt