Helpful Information
 
 
Category: Python Programming
Encoding Python CGI scripts

Hello,

is there any way to encode Python CGI scripts so that the code is not readily exposed on the server? Something like what Zend encoder does for PHP......

Thank you in advance for your answers

Nadik

Not sure what you mean by encoding. Doesn't adding a CGI handler to the httpd.conf file do the trick, something like this:



<Directory /usr/local/apache/htdocs/myscripts>
Options +ExecCGI
</Directory>
AddHandler cgi-script py


Then again, if you want to byte-compile the code, then see my answer to this thread (http://forums.devshed.com/showthread.php?s=&threadid=26237&forumid=11) on the same forum.

Originally posted by Scorpions4ever
Then again, if you want to byte-compile the code, then see my answer to this thread (http://forums.devshed.com/showthread.php?s=&threadid=26237&forumid=11) on the same forum.
Byte-compiling the Python code doesn't hide it enough. It's easily decompiled back into the source using decompyle (http://www.goebel-consult.de/decompyle/).










privacy (GDPR)