main logo
Subject: RE: [ProPython] Source code protection?
Author: "Scott Ramey"
Posted: 2003/11/30 10:33:00
 
View Entire Thread
New Search


Hmmmm.... sounds a lot like VFP, etc. I'm not looking for bullet proof
source protection because I think it's unrealistic. I guess that's one
of the tradeoffs with using interpreted code, with a trade-up being
greatly enhanced productivity.

An old customer I wrote an estimating program for that ran on a Radio
Shack TRS-80, later converted to gwBasic contacted me the a few weeks
ago (took them two years to find me). They wanted to know if there was
a Windows version of the program which amazingly they were using in it's
original form. When I looked at the program I was amazed I did that
much on the TRS-80, about 1,000 lines of code with all those wonderful
variable names A3#, B10$, gosub statements and goto statements all over
the place. I started converting to VFP but am changing horses in
midstream and am going to use it as my Python "educational experience".

Scott


> -----Original Message-----
> From: propython-bounces .at. leafe .DO.T com [mailto:propython-bounces@leafe.com]
On Behalf Of
> Paul McNett
> Sent: Saturday, November 29, 2003 5:13 PM
> To: ProPython Email List
> Subject: Re: [ProPython] Source code protection?
>
> Scott Ramey writes:
>
> > Is there any way to protect the source code? At the least,
> > can extracting the source code be made "difficult" (aka, keep
> > honest people honest, while thieves will continue to steal).
>
> The attitude of most Python developers is for open source code,
> however there are things that you can do to provide the type of
> protection you are after.
>
> 1) pyc files.
>
> When you import a module, Python will look for both the .py file
> as well as the .pyc, which is a compiled Python script. It will
> recompile the .pyc if it deems that necessary. It will then use
> the .pyc and ignore the .py file. If the .pyc file exists and
> the .py does not, it simply uses the .pyc.
>
> So, if you just distribute the .pyc files instead of the .py
> files, you have simple protection. Easy to reverse-engineer,
> but it will keep casual amateur would-be crackers away.
>
> 2) py2exe.
>
> Packagers exist to make exe files (Windows executables) from
> your Python source. A would-be cracker would have to extract
> the files from the exe first. Only package .pyc files and
> they'd also have to reverse-engineer.
>
> 3) make a web service and don't publish the source.
>
> ...
>
> Other ideas and methods I'm sure are abundant.
>
> --
> Paul



 
©2003 Scott Ramey
<-- Prior Message New Search Next Message -->