python obfuscate

Ben Finney ben+python at benfinney.id.au
Thu Apr 10 21:41:11 EDT 2014


Wesley <nispray at gmail.com> writes:

> Hi all,
>   Does python has any good obfuscate?

Define “good obfuscate”. What is your goal?

If it is to hide your program's secrets from others, then obfuscation
isn't going to help: no matter how good it is, it still needs to be
readable by the runtime on the machine.

Moreover, the more effective the obfuscation, the less correspondence
there is between the distributed code and the code ytou actually
maintain. Attempting to debug problems will be infeasible, directly in
proportion to how effective the obfuscation is.

Before looking to obfuscate your code, first establish – beyond mere
emotional conviction – that there actually is something in the code
which is worth hiding from recipients.

> Currently our company wanna release one product developed by python to
> our customer. But dont's wanna others see the py code.

That's impossible: the code is in the hands of the customer. If your
threat model is “the person who possesses the code must not have
access”, then you've lost, just as DRM is a failure.

-- 
 \      “People demand freedom of speech to make up for the freedom of |
  `\   thought which they avoid.” —Soren Aabye Kierkegaard (1813–1855) |
_o__)                                                                  |
Ben Finney




More information about the Python-list mailing list