Data Encryption V2 is a simple yet powerful Python tool that compiles Python source files into bytecode, marshals them, and encodes them using Base85 to obfuscate the original code. The resulting script can be executed directly while keeping the source code hidden from plain view.
This project also features a visually appealing terminal interface using pystyle and rich.
Source Code Obfuscation Convert Python scripts into a single-line executable form, making it hard to reverse-engineer.
Base85 Encoding Uses base64.a85encode for efficient and compact encoding.
Visual UI in Terminal Stylized terminal output using pystyle and rich.console.
Multi-Platform Support Compatible with Windows, macOS, and Linux.
-
Reads a Python source file.
-
Compiles it into bytecode.
-
Marshals the bytecode.
-
Encodes it with Base85.
-
Wraps it into an exec() statement.
-
Saves the encoded version to a new file.
. ├── FilesToEncrypt/ # Source files to be encoded ├── EncryptedFiles/ # Encoded output files ├── encrypt.py # Main encryption script └── README.md # Project documentation
Install the dependencies using pip:
pip install pystyle richUsage
-
Place the Python file you want to encode into the FilesToEncrypt directory.
-
Run the script:
python Main.py-
Enter the name of the file when prompted (e.g., myscript.py).
-
The encoded file will be saved in the EncryptedFiles directory with the prefix enc_.
Input: myscript.py Output: EncryptedFiles/enc_myscript.py (contains obfuscated exec(...) code)
Let me know if you'd like a Vietnamese version or want this turned into an actual GitHub repo for you.