A sophisticated Python code obfuscation tool that combines compression, AES encryption, and multiple encoding techniques to protect your Python scripts.
- Multi-layer obfuscation: Compression + AES-256 encryption + encoding
- Multiple encoding options: Base85, Base64, or Hex encoding
- Payload fragmentation: Splits payload into randomized chunks
- Standalone output: Generates self-contained loader files
- Cross-platform: Works on any system with Python 3.6+
No installation required. Just ensure you have the dependencies:
pip3 install pycryptodomepython3 crypter.py -e input.py -o output.py| Option | Description |
|---|---|
-e, --encrypt |
Input Python file to obfuscate (required) |
-o, --output |
Output file name (optional) |
-
Obfuscate and display in console:
python3 crypter.py -e myscript.py
-
Obfuscate and save to file:
python3 crypter.py -e myscript.py -o protected.py
- Compression: Uses zlib to compress the source code
- Encryption:
- Generates random 256-bit AES key
- Uses CBC mode with random IV
- PKCS7 padding
- Encoding (randomly selected):
- Base85 (ASCII85)
- Base64
- Hexadecimal
- Fragmentation:
- Splits payload into chunks (40-60 chars each)
- Randomizes chunk sizes
The generated loader contains:
- Decoding logic for all supported formats
- AES decryption routine
- Decompression function
- Error handling
- Automatic execution
IMPORTANT LEGAL NOTICE
-
Intended Use: This tool is designed for legitimate code protection purposes only, such as:
- Protecting intellectual property
- Securing sensitive configuration data
- Anti-tampering mechanisms for authorized software
-
Prohibited Uses: Strictly forbidden to use this tool for:
- Malware creation or distribution
- Bypassing license controls of commercial software
- Any illegal or unethical activities
- Obfuscating malicious scripts or payloads
-
No Warranty: This software is provided "as-is" without any warranties of any kind, express or implied.
-
Legal Compliance: Users are solely responsible for ensuring their use complies with all applicable laws in their jurisdiction, including:
- Copyright laws
- Digital Millennium Copyright Act (DMCA)
- Computer Fraud and Abuse Act (CFAA)
- Local cybersecurity regulations
-
Ethical Considerations: By using this tool, you agree to:
- Use it only on code you own or have permission to modify
- Not use it to hide malicious behavior
- Assume all liability for improper use
-
Security Researchers: If using for defensive security research, ensure you have proper authorization before testing on systems you don't own.
- Uses cryptographically strong random numbers
- Proper IV usage for AES-CBC
- Includes integrity checks
- Not immune to reverse engineering - consider this as obfuscation, not true encryption
- Increases code size significantly
MIT License - Free for personal and commercial use
Pull requests welcome. For major changes, please open an issue first to discuss proposed changes.
