Project address: https://github.com/dashingsoft/pyarmor
Example: Use Pyarmor to protect your Python code. Suppose we have a Python script named my_app.py that contains some sensitive code. To protect this script, we can use Pyarmor for obfuscation.
Step 1: Obfuscate the script
pyarmor gen my_app.py
This will generate an obfuscated script named my_app.py in the dist folder.
Step 2: Run the obfuscated script
python dist/my_app.py
Now, we can run the obfuscated my_app.py script normally.
Other features of Pyarmor In addition to basic obfuscation capabilities,
Pyarmor also offers many other features,
such as: • Binding authorization: The obfuscated script can be bound to a specific machine and can only run on that machine.
• Setting expiration time: An expiration time can be set for the obfuscated script, after which the script will not run.
• Code signing: The obfuscated script can be code-signed to verify the integrity and origin of the script.
• Custom obfuscation options: Obfuscation options can be customized as needed, such as selecting which modules to obfuscate, which obfuscation method to use, and so on.
Summary Pyarmor is a powerful and easy-to-use Python code obfuscation tool that effectively protects your Python code from decompilation and theft. It not only provides basic code obfuscation features but also supports script binding, setting expiration times, and other advanced features to meet the security needs of different users.