Concepts¶
Pyarmor CLI¶
Pyarmor CLI is command line tool to generate the obfuscated scripts
Pyarmor CLI Life Cycle¶
Components¶
Functional Relationship¶
Functional Relationship¶
Project¶
Project is set of scripts and options
Obfuscated Scripts¶
Script Type |
Security [1] |
Performance [2] |
Need Extension [3] |
Remark |
---|---|---|---|---|
Std Script |
✫✫✫ |
✫✫✫ |
Yes |
Could bind scripts to device or expired |
Mini Script |
✫ |
✫✫✫✫ |
Yes |
High execution speed, suitable for web services |
RFT Script |
✫✫✫✫ |
✫✫✫✫✫ |
No |
Only rename most variables/classes/functions etc. in the original script |
Notes
Mini Script¶
Mini Script consists of one common Python script and an extension pyarmor_mini.so
For example, there is one script like this
print('Hello')
The corresponding Mini Script would be
from pyarmor_mini import __pyarmor__
__pyarmor__(__name__, b'xxxx')
It’s one common Python script, but need import one extra module pyarmor_mini which could be installed by this way:
$ pip install pyarmor.mini
RFT Script¶
RFT Scripts is same as original Python scripts, only variables/classes/functions etc. are renamed
For example, there is one script like this
1def plusinc(m, n=1):
2 return m + n + 1
3a = plusinc
4b = a
5n = b(1, n=2)
6
7def hello():
8 return b(3, n=4)
9
10print('result is', n + hello())
The corresponding RFT Script would be
1def pyarmor__3(pyarmor__1, pyarmor__2=1):
2 return pyarmor__1 + pyarmor__2 + 1
3pyarmor__4 = pyarmor__3
4pyarmor__5 = pyarmor__4
5pyarmor__2 = pyarmor__5(1, pyarmor__2=2)
6
7def pyarmor__6():
8 return pyarmor__5(3, pyarmor__2=4)
9print('result is', pyarmor__2 + pyarmor__6())