0

I wrote a small software in Python, and I'd like to keep it secure. Of course I know it's the wrong language, but at the moment I cannot rewrite it. The small program will run under a linux box. Eventually I can turn to windows if it's easier to achieve my goal. I'd like to avoid users to unplug the disk and connect to another PC to download the file. In this case I think a crypted partition could be my case, with TPM, or maybe a secure usb key? If a user can have access to the pc, is there a way to let him not read the py files? Like encrypt them but still able to run it, as example with a usb secure key?

thank you

UPDATE/CLOSE I write an update even if the case is closed because it could be useful for someone, I'm using Python 2.7 with Pyglet framework, and with pyinstaller under linux it worked like a charm

NiBE
  • 857
  • 2
  • 16
  • 39
  • Short answer: no. If your program can be understood by the user's processor, it can be understood by the user himself. – spectras Mar 14 '16 at 11:54
  • 2
    Please read this: https://wiki.python.org/moin/Asking%20for%20Help/How%20do%20you%20protect%20Python%20source%20code%3F – cdarke Mar 14 '16 at 11:57
  • 1
    It would be interesting if you detailed what you mean by secure, though, because there are a variety of reasons that the answer can be “no” for: do you mean protected against piracy? do you do “security” by obfuscation? does your program embed sensitive information? – spectras Mar 14 '16 at 11:57
  • 1
    You can't prevent someone from copying one file on one of his computers to another of his computers. You can keep it from being human-readable by converting to binary, but you can't prevent anyone from copying the file unless you just keep it on your own computers. – zondo Mar 14 '16 at 12:02

0 Answers0