Protecting Python source

Kay Schluehr kayschluehr at gmx.de
Sat Nov 27 07:23:12 EST 2004


You can passwort-protect Your zip-files, but how will the passwort ( 
private keys )
be protected?

As Alex Martelli stated: one option is a client-server / webservice 
application which is only used but
by Your customer but not owned by him. Another option is the usage of 
secure hardware i.e.
smartcards and a PKI infrastructure. But this requires probably 
additional appropriate hardware.

If You simply want to fool Your customer You can embed the Python 
interpreter into a C-program,
then zip Your scripts into a file "custom.zip" and rename it to 
"custom.dll" or "custom.ocx" or something else.
At least the cracker should have fun, puzzling this out. But also this 
"solution" will never be more secure than
a compiled C-source. Same with all the Pyrex, py2exe and 
py-2-don't-know-what solutions.

Ciao
        Kay




More information about the Python-list mailing list