A Python script that obfuscates Python source code files using marshal serialization to protect intellectual property.
- Converts Python source code into marshaled bytecode
- Preserves script functionality while making source unreadable
- Simple command-line interface
- Shows user geolocation information (IP and country)
- Cross-platform compatibility (Windows/Linux/macOS)
- Clone this repository:
git clone https://github.com/msrofficial/pyenc.git
cd pyenc- Ensure you have Python 3.x installed:
python3 --version- Install required dependencies:
pip install requestsRun the obfuscator:
python3 enc.pyFollow the on-screen prompts:
- Enter the path to the Python file you want to obfuscate
- Specify the output file name
- The script will generate an obfuscated version of your file
Example output file structure:
#!/usr/bin/env python3
# Obfuscated By MSR
import marshal
exec(marshal.loads(b'\x63\x00\x00\x00...')) # marshaled bytecodeThe obfuscator:
- Reads your Python source file
- Compiles it into Python bytecode
- Serializes the bytecode using Python's
marshalmodule - Generates a new Python file that loads and executes the marshaled bytecode
- Works only with Python code
- Obfuscated files are slightly larger than original
- Requires Python environment to run
This tool is intended for educational purposes and protecting intellectual property. Please use responsibly and in compliance with all applicable laws. The author is not responsible for any misuse of this software.
Sakibur Rahman (MSR)
- Website: https://msrsakibur.netlify.app
- GitHub: https://github.com/msrofficial
- Facebook: https://www.facebook.com/sakibur.msr
This project is licensed under the MIT License - see the LICENSE file for details.