PHP 可以使用 Zend Guard 对源码加密,然后发布使用。
想知道 Python 有没有类似的加密工具,加密后的代码仍然可以运行。
ringa_lee2017-04-17 13:39:22
Just publish the pyc file generated by compiling the python source codepython -m py_compile src.py
http://my.oschina.net/wizardpisces/blog/107445
大家讲道理2017-04-17 13:39:22
In fact, encryption is very simple. Modify the code of the Python virtual machine, modify the virtual code for the part where pyc is compiled, or swap a few. No one else can figure it out. This method comes from (Yunfeng Daxia) (from the book "My Programming Insights")
The disadvantage is also obvious, you must use your own modified Python virtual machine when executing.
巴扎黑2017-04-17 13:39:22
At best, it is just confusion. It is impossible to achieve encryption in the true sense. This is the nature of interpreted languages.
天蓬老师2017-04-17 13:39:22
You can use this python obfuscator to encrypt.
The encryption effect is irreversible, and other methods such as pyc, compiling into exe or even modifying the bytecode are easier to restore.
黄舟2017-04-17 13:39:22
The most Python can do is obfuscate as mentioned above. If you want to encrypt the data, I haven’t found a good solution yet
PHP中文网2017-04-17 13:39:22
Compile the core code into an os file using cython (note: python syntax is still used).