Changing Opcode Numbers

Alex Martelli aleax at aleax.it
Wed Jan 30 17:11:03 EST 2002


Emmanuel Astier wrote:
        ...
> Is changing the Opcode order (that means creating my own python lib )
> in opcode.h enougth to make a good protection from python decompiler ?

That's not very strong encrypting (basically a Caesar's cypher), but since
you're distributing your own python DLL (or better still running it just on
your own server), there's no limit to the encryption you can do.  Clearly,
if somebody disassembles or cleverly debugs the DLL he or she can get
at the "in-clear" bytecode (if you distribute the DLL), but that level of
attack is very hard (impossible, assuming a good-enough adversary) to
protect against.  Barring that, there's ample supply of good cryptography
libraries you can freely snatch from the net and easily integrate with
Python's interpreter code.


Alex




More information about the Python-list mailing list