Skip to content

Latest commit

 

History

History
109 lines (71 loc) · 3.5 KB

security.rst

File metadata and controls

109 lines (71 loc) · 3.5 KB

Highest security and performance

.. program:: pyarmor gen

The following options could improve security

The following options hide module attributes

The following options prevent functions or modules from being replaced by hack code

Using default options and the following settings

With these options, the security is almost the same as .pyc

In order to improve security, and doesn't reduce performance, also enable RFT mode

If there are sensitive strings, enable mix-str with filter

Without the filter, all of the string constants in the scripts are encrypted, which may reduce performance. Using filter only encrypt the sensitive string may balance security and performance.

For Django application or serving web request

If RFT mode is safe enough, you can check the transformed scripts to make a decision, using these options

If RFT mode is not safe enough, using these options

For most applications and packages

If RFT mode and BCC mode are available

If RFT mode and BCC mode are not available

If care about monkey trick, also

If it's not performance sensitive, using :option:`--enable-themida` prevent from debuggers

Move main script module level code to other module

Pyarmor will clear the module level code after the module is imported, the injected code could not get any module level code because it's gone.

But the main script module level code is never cleared, so moving unnecessary code here to another module could improve security.