Protect Python Source
Christian Tismer
tismer at tismer.com
Sat Nov 2 09:24:52 EST 2002
Lemniscate wrote:
> Christian Tismer <tismer at tismer.com> wrote in message news:<mailman.1036145342.13403.python-list at python.org>...
>
>>Using the Installer gives you the advantage that
>>no source code can be seen and even no bytecode
>>is visible in the first place. It is of course ungzipped
>>from the executable at execution time, but there are
>>no visible files, it is in memory, only.
>
>
> Actually, this isn't quite true. If you open the exe generated by the
> Installer with a text editing program (even NotePad works), your code
> is visible in the code (just do a search for you imports or a def
> statement and you'll find it.
Only if you turned off the compression.
I just ran my 3.5 mb generated .exe through
a cygwin strings command, and nothing readable
was a little stuff from the installer and
from the zlib.
Did you add your scripts and modules using plain
PYSOURCE or PYMODULE types?
They should of course all end up in a PYZ type
that makes them unreadable by compression.
> Usually, I find it in either the dead
> center of the file, or towards the end of the file. In fact, if you
> cut and paste, you will have your code back (I've actually done this
> before when my wife deleted some of my source back-ups, and it works
> perfectly).
This still works with my .exe as well, given that I add the
sources by hand, too. Usually, only the real scripts are
in source form, al other stuff is in modules, which are
added as .pyc files. So I really wonder how you used
the installer ???
> For some interesting reading (and some nice laughs along the way),
> check out: http://groups.google.com/groups?hl=en&lr=&ie=ISO-8859-1&q=obfuscation&meta=group%3Dcomp.lang.python.*
That's really funny!
Great idea, to just generate Perl :-)
ciao - chrid
--
Christian Tismer :^) <mailto:tismer at tismer.com>
Mission Impossible 5oftware : Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a : *Starship* http://starship.python.net/
14109 Berlin : PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34 home +49 30 802 86 56 pager +49 173 24 18 776
PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04
whom do you want to sponsor today? http://www.stackless.com/
More information about the Python-list
mailing list