python obfuscate

Chris Angelico rosuav at gmail.com
Fri Apr 11 11:30:27 EDT 2014


On Sat, Apr 12, 2014 at 1:19 AM, Michael Torrie <torriem at gmail.com> wrote:
> Most end users will never know or care what you build the app with, even
> if you have a directory full of open .py files.  99% of the users of a
> popular ebook app called Calibre never know or care that it's made of
> python and that you could go in and see the code.  All they care about
> is they can click an icon and the program launches and runs.

Absolutely. When you run "hg something_or_other", you would expect
that it's all written in Python, but some of it might not be, for all
you know. Certainly with git there are several languages used (some
are compiled binaries, some are shell scripts, some are Perl, gitk is
TCL...), and it doesn't matter at all. Who cares? I type a command and
it runs. If upstream decides to rewrite bash in Lua, I won't much
care, and probably wouldn't even know (although somehow I suspect
performance would drop... slightly...).

Adding to your list, though:

If you're trying to hide your source code for security, absolutely DO
NOT! This is one of the most common reasons I've heard of; either
because the "cryptographic" algorithms are hand-rolled and easy to
reverse-engineer if you have the source, or because the keys are
hard-coded in the program. Either way, you can't. It just won't work.
People can get at your crypto, and if it's broken as soon as someone
sees the source code, it's weak crypto to start with.

ChrisA



More information about the Python-list mailing list