Protecting Python Code

Started by
14 comments, last by Monty Python 20 years, 9 months ago
Well wasn''t there something to compile java programs to C++? I agree that it would be really insane to have a python->java->C++ conversion but it would be kind of funny ^_^
Advertisement
Reverse engineering (when pre-obfuscated in Java's case) tends to produce source code like "int f061(*c017 o044, *c022 o045)". In any program of sufficient size, it's plenty of work to make it look like a human's. I wouldn't worry about it being passed off as someone else's; they could claim they obfuscated it themselves, but few people would buy that.

I will second the GPL route. Even total strangers in the open source scene will not pass up a chance to torture, kill and devour the bodies of those who would dare steal GPLed code.

[edited by - Sakuranbo on July 2, 2003 10:21:55 PM]
How do you steal GPL code?
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
By using it in a non-GPL product.

How appropriate. You fight like a cow.
.pyc files are relatively easily decompiled.

Just don''t. If you try, it''ll look like you have something to hide, which means you have something of value, which means people will try harder.

Really, the best way is to fool your audience into thinking that they are not using Python code, and thus don''t know to look for the source.

Or you could rewrite the parts you have to hide as a module, and import that into your Python scripts, which will have relatively little of importance. From the sound of it, though, you don''t actually have anything worth stealing (i.e. interesting, nonobvious bits of code), just something that might be worth pirating, so it''s probably not worth the bother.

Distributing the source to scripting parts of code is not unheard of. BBS programs are typically written in perl and distributed in source code. In the case of Python, Paint Shop Pro 8 uses Python for scripting, and distributes the sources to several files.
---New infokeeps brain running;must gas up!
quote:Original post by Monty Python
I''ve recently started to learn Python and am wondering if there are any good methods to protect the source code when distributing programs.

The only good way to protect your intellectual investment (whatever the language) is through recourse to the law. Slap a copyright notice on your programs. Of course, one might ask why you care about anyone stealing your source-code? Unless there really is an intellectual investment to be protected, I''d suggest pasting-in a standard notice saying that your source can be distributed and used freely as long as your work is attributed via copying and pasting the same notice into derivative works. Something like a BSD licence.
quote:
The only way I know is to force the user to sign a legal document before using the program/script but that isn''t very practical.

Isn''t it? I''ll wager you have to `sign'' a legal document for much of the stuff you download from the ''net. It appears to be fairly practical.

This topic is closed to new replies.

Advertisement