Skip to content

msrofficial/pyenc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Python File Obfuscator

A Python script that obfuscates Python source code files using marshal serialization to protect intellectual property.

Features

  • 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)

Installation

  1. Clone this repository:
git clone https://github.com/msrofficial/pyenc.git
cd pyenc
  1. Ensure you have Python 3.x installed:
python3 --version
  1. Install required dependencies:
pip install requests

Usage

Run the obfuscator:

python3 enc.py

Follow the on-screen prompts:

  1. Enter the path to the Python file you want to obfuscate
  2. Specify the output file name
  3. 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 bytecode

How It Works

The obfuscator:

  1. Reads your Python source file
  2. Compiles it into Python bytecode
  3. Serializes the bytecode using Python's marshal module
  4. Generates a new Python file that loads and executes the marshaled bytecode

Limitations

  • Works only with Python code
  • Obfuscated files are slightly larger than original
  • Requires Python environment to run

Disclaimer

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.

Author

Sakibur Rahman (MSR)

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Obfuscates your python source code using marshal serialization.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages