-1

I have made a tool/program on Ubuntu written in Python. I want to give this to my friend to test on his PC, but I don't want to share the source code.

This program has many folders and many .py files. Is there a way to turn all this code into one encrypted executable file (like a binary file)?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Sam
  • 79
  • 2
  • 10
  • 2
    How is it encrypted? It's no more encrypted than writing in Chinese to a Chinese person so he can actually understand you... the correct word is probably "obfuscation". – Thomas Nov 30 '13 at 07:23
  • 1
    http://stackoverflow.com/questions/261638/how-do-i-protect-python-code – Sabareesh Nov 30 '13 at 07:25
  • Look at [cx_freeze](http://cx-freeze.readthedocs.org/en/latest/). It will allow you to create the executable output, but from what I can tell not obfuscate it. As the link above points out, however, you might not get the protection you expect from obfuscation anyway. – Mark Hildreth Nov 30 '13 at 07:30
  • thanks for cx_freeze...it worked for windows but I need it in Ubuntu. `import sys from cx_Freeze import setup, Executable setup( name = "test", version = "3.1", description = "testing cx_freeze.", executables = [Executable("a.py")])` this is my code. It can make a executable but that doesnt work. – Sam Dec 02 '13 at 06:12

1 Answers1

0

You can always obfuscate the source code. Here you can use the tool pyobfuscate. To know more about obfuscation, go to obfuscating Python code and information about protecting Python code.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
ironman_ma
  • 375
  • 2
  • 9