#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2001
    Posts
    0
    Rep Power
    0

    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
  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,638
    Rep Power
    4247
    Not sure what you mean by encoding. Doesn't adding a CGI handler to the httpd.conf file do the trick, something like this:

    Code:
    <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 on the same forum.
  4. #3
  5. No Profile Picture
    Python Prophet
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2001
    Location
    Amersfoort, The Netherlands
    Posts
    45
    Rep Power
    14
    Originally posted by Scorpions4ever
    Then again, if you want to byte-compile the code, then see my answer to this thread on the same forum.
    Byte-compiling the Python code doesn't hide it enough. It's easily decompiled back into the source using decompyle.
    Some people, when confronted with a problem, think I know, I'll use regular expressions. Now they have two problems. - Jamie Zawinski, in comp.lang.emacs

IMN logo majestic logo threadwatch logo seochat tools logo