pyc file problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Leo Yee

    pyc file problem

    Hi,

    I am programming a online game program. I use python as my game's script
    language. To avoid hacking and cheating I don't want anyone to read the
    python script file and find useful information for hacking the game.

    I know I can compile the '.py' file to '.pyc' file but I found that a normal
    text editor can read a lot of information from the '.pyc' file even those
    comments I wrote.

    My question is if there is a methond to compile the '.py' file into a state
    that there are no human readable strings.

    Thanks in advance.

    Leo Yee




  • sid

    #2
    Re: pyc file problem

    i doubt there are any good name manglers for python.especial y with it being
    dynamic.

    you could encrypt your game files. of course the loader would have to be
    mangled by hand.

    if you are keen on this you could look at the tempfile and imp modules.

    this is not foolproof. people could still step through your code and crack
    it.

    just wondering, is it smart to have any of the game's logic on the users
    machine. i can see a lot of situations other than hacking and cracking the
    code that could lead to problems.


    Comment

    Working...