How to decompile an exe file compiled by py2exe?

L

Leo Jay

Dear All,

I lost my source code because of my incaution.
so anyone can tell me how to decompile the exe file compiled by py2exe?

Thanks.
 
T

Thomas Jollans

Leo said:
Dear All,

I lost my source code because of my incaution.
so anyone can tell me how to decompile the exe file compiled by py2exe?

Thanks.

If you find a program that de-compiles exe to python, it will most
likely use very ugly, c-like python because a microchip is no python
interpreter. This is based on the assumption that py2exe really
generates a pure exe and not an exe that interprets bytecode python.
be that the case, it may yield decent results, but ugly nontheless.

It might better to re-write it...
 
I

Ivan Voras

Thomas said:
interpreter. This is based on the assumption that py2exe really
generates a pure exe and not an exe that interprets bytecode python.
be that the case, it may yield decent results, but ugly nontheless.

It is - py2exe embeds python bytecodes. It seems it does it in the
"library.zip" file (if I'm reading
http://starship.python.net/crew/theller/moin.cgi/Py2Exe correctly).
Bytecode files extracted should be decompilable to something resembling
original python code by a python decompiler (quick Googling finds
"decompyle": http://www.crazy-compilers.com/).
 
A

A.B., Khalid

Leo said:
Dear All,

I lost my source code because of my incaution.
so anyone can tell me how to decompile the exe file compiled by py2exe?

Thanks.


In older versions of py2exe (haven't tried it for new ones) I only had
to drag the py2exe created file to my zip archiever program window.
That somehow got the program to treat the py2exe application as a zip
archieve effectively decompressing it right there in the window of the
program. This enabled me to extract the files if I wish to do so to any
place I want.

This is also valid, I noted, for the binary distributions created for
windows by the distutils.
 
?

=?ISO-8859-1?Q?Jean-Fran=E7ois_Doyon?=

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top