Variables name in Byte code

Gerhard Häring gh_pythonlist at gmx.de
Fri Oct 5 20:59:39 CEST 2001


On Fri, Oct 05, 2001 at 02:46:50PM -0400, Ignacio Vazquez-Abrams wrote:
> On 5 Oct 2001, Kaci Tizi Ouzou wrote:
> 
> > Greetings all,
> >
> > I was examining python compiled code and surprisingly I could see
> > clearly the names of some variables.
> >
> > Is there anything I could do to make Python Byte code more obscur.
> > I do not want user trying to hack the code(!)
> >
> > Thanks
> 
> Well, you could encrypt the code object for the file then encapsulate it in a
> program to decrypt it and run it with eval().

You'd have to let the user enter a password each time the program
starts, right? Ah, perhaps also store the hash of the password somewhere
so you can tell if it was entered correctly. Otherwiese when the .pyc is
decoded with a wrong password and executed, it could crash the
interpreter.

Now that I come to think of it, you don't need to ask the password each
time. The password *is* the license key. Or part of the license key. So
you only have to ask it once, because the license key is stored in a
file or in the registry.

The question then is, how long it will take until a crack shows up on
astalavista.box.sk ;-)

Gerhard
-- 
mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    http://www.cs.fhm.edu/~ifw00065/    OpenPGP public key id 86AB43C0
public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))




More information about the Python-list mailing list