1 Reply Latest reply on Jan 4, 2016 9:05 AM by Intel_Peter

    How to prevent people from coping the code on the Edison?

    haodong

      Hi All,

       

      I have a python script in Edison, and I am going to put it into market.

      So I am wondering how to prevent people from coping my code?

      More methods are better : D

       

      Many thanks

      Hao

        • 1. Re: How to prevent people from coping the code on the Edison?
          Intel_Peter

          Hello haodong,

           

          The thing with Python is, that it is a bytecode language, this means that Python in itself is very difficult to lock/obfuscate. The reason why it is so hard obfuscate code written in Python is because the language from the ground up was designed to be open source, so anyone skilled enough has an easy way to reveal or modify Python related stuff, not just code but the interpreter itself. There are some ways to "protect" code in Python such as pyc or pyo but even scripts protected with such packages can be reverse engineered by an experienced user.

           

          So, my suggestion is, if the security of your code is your number one priority then maybe Python is not the ideal tool for you. But if you must use Python in your project by one reason or another then I'd suggest you to read Protecting a Python codebase, it explains the pyc and pyo methods that I mentioned before and also explains a method using a static compiler for Python called Cython. That is the most helpful document I could find, I hope it helps with your project.

           

          Peter.