This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Can EXE generated by cx_freeze be completely decompiled back to readable Python code?
I've used cx-freeze to convert a python script to an executable. Is it possible to reverse that? Can I get my python script from the binary cx-freeze has generated?
EDIT. This is a practical question. I really need to recover one cx-freezed executable to a more-less readable form. Does anyone have a recipie of doing it?
Any 'frozen' PY application can be disassembled but not really decompiled. With enough time and patience someone would be able to reverse-engineer nearly any program (including yours).
Edit
Correction as per comments below.
Related
This question already has answers here:
Process to convert simple Python script into Windows executable [duplicate]
(8 answers)
Closed 9 years ago.
I have been working a lot on python recently, mostly using IDE. Now I have a need to make a .exe program out of my code. Have tried cx_freeze but i couldn't understand what to do. So, if anyone could either give me a link to a good guide for begginers, or another easier .py to .exe program, I would be grateful.
PS
I am using Python 3.3.
Try py2exe..
Install py2exe in your system, then generate a setup file as shown here
Thats it. Your .exe file will be created.
This question already has answers here:
Is it possible to decompile a compiled .pyc file into a .py file?
(9 answers)
Closed 9 years ago.
I'm a newcomer to programming, and currently taking a course on MIT OCW, using Python 2.6.
The site provides me with a .pyc file, and I wonder if it can be decompiled back to a .py file.
I have researched some ways on the Internet, such as this: Is it possible to decompile a compiled .pyc file into a .py file?
But I just can't understand what they're saying (newcomer).
It would be a great help for newcomers like me if there is a detailed guide on how-to-do this.
Thank you, and sorry for my bad English.
You may check this tools might help you.
http://sourceforge.net/projects/unpyc/
This question already has answers here:
a good python to exe compiler? [closed]
(3 answers)
Closed 9 years ago.
With some useful answers of my previous question (See below), I decided to give py2exe another try.
I tried the tutorial from py2exe.org (http://www.py2exe.org/index.cgi/Tutorial), but got an error at step 3. I did 1 and 2 exactly as told, and put both files (hello.py and setup.py) in my main folder where I installed python in: D:\Programs\Python.
When running the 'code' form step 3 I got the following error, totally on the bottom of the output:
"ImportError: DLL load failed: %1 is not a valid Win32-application.*"
I've got a screenshot of the entire output, but I don't know where to upload it.
Extra information:
I have 64bit Windows 7 (profesional) and Python 2.7.3 (first I had 3.3.0, but downgraded because of some reasons). It is not a big problem for me to change to another version. I downloaded py2exe 0.6.9.
Note: I couldn't choose between py2exe for 32- or 64bit. I guess then a error should show up earlier, but it might be handy to know.
*I literally translated the last part from Dutch, so it can be slightly different then English pc's.
Previous question:
What is the easiest .py to .exe converter?
I've tried a few converters, of which cx_Freeze and py2exe. Using cx_Freeze was too complicated (I couldn't find a good tutorial) and py2exe gave some errors. Before I'm going to try to understand one of these two or try another one, I want some input which converter you think is the best, and I need a good tutorial.
I have barely experience with cmd, and am quite a newbie if it comes to programming/python, so I am looking for the easiest-to-use converter.
If you say I really need some cmd experience, please direct me to a cmd tutorial/course.
you can use GUI2exe that's the easiest way im my opinion !
You wont learn much about the converter's but it gets the job done without any problems.
ps. GUI2exe isnt a converter , its a gui to use the converters!
What kind of erros does py2exe give you? That is what I use and it works like a charm for me.
I've used py2exe previously. I assume you've looked at the tutorial on the py2exe project page?
There is also a good one available on the Python Library page.
I used py2exe for complicated Python/Qt/PyQt applications. The biggest thing you'll need to know about that is that the MSVCP90.dll file is needed. You can get that from Microsoft. You'll then need to copy it and the other files mentioned in it's license to the Python DLLs directory. Detailed instructions are available on the py2exe tutorial (Step 5)
Try py2exe and cx-freeze. These are the two most common ones you'll find out there. Most others are generally a derivative of cx-freeze
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How do I protect python code?
How do I hide my python code, I don't want the code to be available to everyone to see.
I know python is interpreted, but is there a way, tool .. etc to allow someone to use the software without being able to see the code?
You can reduce it to pyc files, but that's not really like full compilation. Python isn't really designed to be able to 'hide' code. The only way to fully hide implementation details that I know of is to deploy all your core logic on a server and expose it as services to your distributed app.
Maybe Pyrex might help you. It is a python to C compiler ; it is intended to let you make modules available to python. That way, you could choose what to hide from the user (as it would be in an opaque module) and what to show.
You could probably (after talking with some lawyers) plaster your code with license info (legally) preventing 3rd parties from using your code in ways that you don't want...but as other have said, if the user can run your code on their machines, they can "see" it (if they're determined enough at least) -- even if bundled in an exe or in pyc files...
Compile it and/or create an executable file with it?
http://www.py2exe.org/
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How can I make an EXE file from a Python program?
I have found several links talking about what to do, but I am unsure of how to use them. They often say to just use the code, but they don't say if I should put it in the terminal or use it to make a program to run. Many recommend the use of py2exe but when I try to use it it will not run because it says I do not have python 2.6 in my registery. I am rather new to the more complicated side of programming and any help would be appreciated. I am running windows vista.
This is certainly a duplicate question, but I'd recommend using py2exe. We probably need more information on how or why you are failing.