Replies: 1 comment 8 replies
-
If you are using PyInstaller for obfuscation, then you are using a wrong tool...
If decompression time of a large program is a problem, you should not be using onefile mode.
I'm not sure I follow. You seem to be using |
Beta Was this translation helpful? Give feedback.
-
My team already uses pyinstaller to obfuscate and package an application to customers. The problem is that because our application uses a lot of large packages, e.g. scipy and numpy, the start time up time is slow because pyinstaller decompresses these packages these large packages at startup time.
To speed things up, we want to move away from packing and unpacking at runtime. We already have a spec file that collects our sources and all our dependencies into one directory. The spec file looks like something like this:
The command
pyinstaller --clean --noconfirm Application.spec
uses this spec file to create a small (about 350kb) exe that launches the application.We can now obfuscate our sources in place which were copied courtesy of the command argument
include_py_files=True
. The problem however is that post-obfuscation when I delete the *.pyc files the application no longer runs and complains about a missing module.However I can still run python path/to/obfuscated_application_entry_module.py. This is not of much help to customers though because pyintstaller does not package python.
Is there a way to rebuild the small exe based on the obfuscated source or rather to simply launch the
obfuscated_application_entry_module.py
?Beta Was this translation helpful? Give feedback.
All reactions