Python - Pyinstaller
Last updated
Last updated
Python scripts packaged with pyinstaller have an IDE in them. Converts all scripts into bytecode and packages in an executable. Can be encrypted with a key.
A .pyz file is just a normal zip with a header that allows it to be executed. Python can import modules from a zip file exactly like from a subdirectory.
So, if the function is in a file called __main__.py
, you just do:
Zipapp: This module provides tools to manage the creation of zip files containing Python code, which can be executed directly by the Python interpreter
Point at file name and it will output all .pyc files.
The AES key is stored in the pyimod00_crypto_key file. It's just a .pyc so it can be decompiled.
If you want to hide your source code more thoroughly, one possible option is to compile some of your modules with Cython. Using Cython you can convert Python modules into C and compile the C to machine language. PyInstaller can follow import statements that refer to Cython C object modules and bundle them.