View Single Post
Old Jun 12th, 2005, 1:04 AM   #1
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,886
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
I was kind of upset when I heard that

Python has no way of hiding it's source code when made into an exe file. So I thought I'd try to do my best to solve that.

www.1v7.com/drsane/a1k8u.txt
is really the new source code replacing:
www.1v7.com/drsane/mini_game_luck.py

That is what source code can now look like thanks to my program:

www.1v7.com/drsane/Process_Data.py

It's a very simple yet effective encryption method. Yes, of course it's breakable. But I've probably narrowed down potential source editors by at least fifty percent.

The program is really easy to use:

Header = """
==================================================

WARNING!

DO NOT EDIT ANY CONTENTS OF THIS FILE!
FAILURE TO COMPLY MAY DEEM LOSS OF PROGRAM ACCESS!

Encrypted by JDI 2005 (c)    - dr.sane@gmail.com -

==================================================
"""

SOURCE = SOURCE(Header)

SOURCE.ENCRYPT('mini_game_luck.py', 'a1k8u.soul', 1)
SOURCE.EXECUTE('mini_game_luck.py', 'a1k8u.soul', 1)

The header is what is shown at the top of the encrypted file for whatever purpose.

That simple program demonstrates encrypting a source file (which can have any non-traditional extension). Then runs the encrypted source file (the original source file path is only there for added security, you don't actually need the original file anymore). Soon enough instead of having only 1 for the third argument, I'll add some more choices for more complex encryptions.

The example and the format can be found in the Process_Data.py file.

Please give me suggestions and feedback, and if you want to use this program to encrypt your source code, feel free (but give me credit).

- The Sane

Last edited by Sane; Jun 12th, 2005 at 1:51 AM.
Sane is offline   Reply With Quote