Obfuscator, EXE, etc. - a solution

Thomas Heller theller at python.net
Wed Apr 7 16:05:29 EDT 2004


jason willows <apocalypznow at yahoo.com> writes:

> There have been many many many many discussions about obfuscating
> python.
distributed as py2exe'd package, iirc.

Even I was not happy that (up to py2exe 0.4) the context menu for a
py2exe'd exe-file contained winzip entries like those for any other zip
file.  Or when dragged the exe-file with the right mouse button,
intending to create a shortcut, the menu popping up had 'extract to
here' in addition to 'create shortcut' and 'copy'.

In py2exe 0.5 the zip-file is separate from the exe, so the exact issue
isn't any longer.  And, better yet, you can specify a different name
(and extension!) for the code archive - for exampled 'shared.dll'
instead of 'library.zip', and, at least the system does no longer
suggest to the innocent user to peek into this zipfile.

That's a very cheap 'obfuscation', but it helps a lot.  IMO.

Regarding your other solution, compiling the .py files with pyrex, at
least leaves the possibility to *use* the modules from a python
interpreter.  Only encryption, as Dave suggested, prevents that.  Unless
the encryption is reversed, of course ;-).

Thomas





More information about the Python-list mailing list