how to convert a python file to an executable file

Put your programming skills to the test in these challenges.

how to convert a python file to an executable file

Post by ghostheadx2 on Thu Jun 11, 2015 3:44 pm
([msg=88467]see how to convert a python file to an executable file[/msg])

I got this code online to try and convert a python file into an executable file, but it's not working:

Code: Select all
from distutils.core import setup
import py2exe
setup(console=['myscript.py']) #change 'myscript' to your script


It changed it to this:

Code: Select all
from distutils.core import setup
import py2exe
setup(console=['XOR.py']) #change 'myscript' to your script


I need to be able to do this so I can brute force a key using XORsearch. Here's what XORsearch is:

http://www.securitytube.net/video/6003

http://blog.didierstevens.com/programs/xorsearch/

I also tried to use a wizard built into windows, but it made a copy of the file that was ".cab" and was apparently some other form of executable. I think that's not working, but I also want to know if someone could give me a better idea of useful commands because after playing around with XORsearch, I found that it was pretty hard to use. That would just make my day. The tutorial I just linked gave me a little insight.
ghostheadx2
Contributor
Contributor
 
Posts: 728
Joined: Wed Nov 19, 2014 1:19 am
Blog: View Blog (0)


Re: how to convert a python file to an executable file

Post by ghost107 on Thu Jun 11, 2015 6:47 pm
([msg=88468]see Re: how to convert a python file to an executable file[/msg])

You know python is a scripting language, which is run by an interpreter,where the executable file is compiled and linked from source files.

Most of the tools that gives the possibility of to make a exe from the scripting languages, are usually wrappers. To make a executable try to chose a language that compiles and links to a PE(portable executable), also .Net executable and PE(windows native executable) are not the same thing.

PE is assembled (assembly)into the machine language, where it is directly executed by the CPU.
.Net executable, is assembled into MSIL(Microsoft Intermediate Language), where it is executed by the .Net framework(to me .net framework applications are virtualized)
User avatar
ghost107
Poster
Poster
 
Posts: 321
Joined: Wed Jul 02, 2008 7:57 am
Blog: View Blog (0)



Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests