██╗ ██╗ ███████╗███╗ ██╗ ██████╗ ██████╗ ██████╗ ███████╗██████╗
╚██╗██╔╝ ██╔════╝████╗ ██║██╔════╝██╔═══██╗██╔══██╗██╔════╝██╔══██╗
╚███╔╝ █████╗█████╗ ██╔██╗ ██║██║ ██║ ██║██║ ██║█████╗ ██████╔╝
██╔██╗ ╚════╝██╔══╝ ██║╚██╗██║██║ ██║ ██║██║ ██║██╔══╝ ██╔══██╗
██╔╝ ██╗ ███████╗██║ ╚████║╚██████╗╚██████╔╝██████╔╝███████╗██║ ██║
╚═╝ ╚═╝ ╚══════╝╚═╝ ╚═══╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝
Python Source Code Encoder for Termux
Version Platform Language License Author Telegram Stars Forks Issues Last Commit Repo Size
X-ENCODER is a Termux-based Python source code protection tool. It encodes your .py files using 3 layers of obfuscation — making them extremely difficult to read or reverse-engineer, while still being fully executable.
Protect your scripts before sharing them. Keep your logic private.
Original .py ──► Marshal (bytecode) ──► Zlib (compress) ──► Base64 (encode) ──► Encoded .py
| Layer | Method | Purpose |
|---|---|---|
| 1st | marshal |
Compiles source to Python bytecode (code object) |
| 2nd | zlib |
Compresses marshalled bytes (level 9) |
| 3rd | base64 |
Encodes compressed bytes to ASCII-safe string |
The output file is self-executing — no decoder needed. Just run it normally with python file.py.
X-ENCODER-/
├── main.py — Entry point (banner → update check → menu)
├── config.py — Tool config, version, developer info
├── banner.py — ASCII banner + info box renderer
├── updater.py — Auto update from GitHub
├── encoder.py — Core 3-layer encoding logic
├── menu.py — Interactive menu & input handlers
├── utils.py — Colors, animations, progress bar, prompts
└── installer.sh — Auto installer + storage permission + launcher
apt update && apt upgrade -y pkg install git -y git clone https://github.com/M41NUL/X-ENCODER-.git cd X-ENCODER-
bash installer.sh
The installer will:
- Update Termux packages
- Install Python, pip, git
- Request Android
/sdcardstorage permission viatermux-setup-storage - Show animated progress bars for each step
- Auto-launch
main.pyafter a 3-second countdown
cd X-ENCODER-
python main.py| Command | Description |
|---|---|
git clone https://github.com/M41NUL/X-ENCODER-.git |
Clone the repo |
cd X-ENCODER- |
Enter project folder |
bash installer.sh |
Install dependencies + launch |
python main.py |
Run tool manually |
git pull origin main |
Pull latest update manually |
rm -rf X-ENCODER- |
Remove / uninstall the tool |
To completely remove X-ENCODER from your device:
cd /sdcard # or wherever you cloned it rm -rf X-ENCODER-
[1] Encode Single File — Encode one .py file
[2] Encode Folder — Encode all .py files in a folder
[3] About / Info — Developer info
[0] Exit
Enter file path : /sdcard/myproject/hello.py
Enter output name (without .py) : hello_encoded
✔ Saved: /sdcard/myproject/hello_encoded.py
Enter folder path : /sdcard/myproject/scripts/
Enter output folder name : scripts_encoded
✔ Saved to: /sdcard/myproject/scripts_encoded/
All .py files inside the folder are encoded. Output folder is created as a sibling of the input folder.
Every encoded file includes this comment block at the top:
# Tool : X-ENCODER # Type : Marshal + Zlib + Base64 # Date : 2025年01月01日 12:00:00 # Dev : Md. Mainul Islam (CODEX-M41NUL) # GitHub : https://github.com/M41NUL # Warning : This file is encoded. Do not edit.
| Color | Hex / ANSI | Usage |
|---|---|---|
| Green | 033円[92m |
Primary, success |
| Red | 033円[91m |
Errors, secondary |
| Orange | 033円[38;5;208m |
Accent, prompts |
| White | 033円[97m |
Dim text, body |
| Name | Md. Mainul Islam |
| Brand | CODEX-M41NUL |
| GitHub | github.com/M41NUL |
| Telegram | t.me/mdmainulislaminfo |
| Channel | t.me/codexm41nul |
| Group | t.me/codex_m41nul |
| YouTube | youtube.com/@codexm41nul |
| devmainulislam@gmail.com |
If this tool helped you, give it a star on GitHub and join the Telegram channel for updates!