Enviroments:
- linux.armv7
- Python 3.12
- Pyarmor 9.2.3 with Pro License
Inputs:
import sys
print('this platform is', sys.platform)
Reproduced steps:
$ pyarmor gen --enable-rft test.py
$ python dist/test.py
# Output: Segmentation fault (core dumped)
Solutions:
- Disable builtins refactor and enable simple import refactor by this way
$ pyarmor cfg rft_simple_import=1 rft_enables="import function class global local"
$ pyarmor gen --enable-rft test.py
$ python dist/test.py
# Output: this platform is arm
- Use Pyarmor v9 new features
pyarmor build --rft
$ pyarmor init -e test.py
$ pyarmor build --rft
It will generate one reformed script to dist/test.py, then obfuscate it as before.
Please check pyarmor v9 doc
https://pyarmor.eke.org.cn