M41NUL/X-ENCODER-

GitHub: M41NUL/X-ENCODER-

一款基于 Termux 的 Python 源代码编码器,通过 marshal、zlib 和 base64 三层混淆来保护 .py 脚本。

Stars: 2 | Forks: 1

``` ██╗ ██╗ ███████╗███╗ ██╗ ██████╗ ██████╗ ██████╗ ███████╗██████╗ ╚██╗██╔╝ ██╔════╝████╗ ██║██╔════╝██╔═══██╗██╔══██╗██╔════╝██╔══██╗ ╚███╔╝ █████╗█████╗ ██╔██╗ ██║██║ ██║ ██║██║ ██║█████╗ ██████╔╝ ██╔██╗ ╚════╝██╔══╝ ██║╚██╗██║██║ ██║ ██║██║ ██║██╔══╝ ██╔══██╗ ██╔╝ ██╗ ███████╗██║ ╚████║╚██████╗╚██████╔╝██████╔╝███████╗██║ ██║ ╚═╝ ╚═╝ ╚══════╝╚═╝ ╚═══╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ ``` **适用于 Termux 的 Python 源代码编码器** [![Version](https://img.shields.io/badge/version-1.0.0-brightgreen?style=flat-square)](https://github.com/M41NUL/X-ENCODER-) [![Platform](https://img.shields.io/badge/platform-Termux%20%7C%20Android-orange?style=flat-square)](https://github.com/M41NUL/X-ENCODER-) [![Language](https://img.shields.io/badge/language-Python%203-blue?style=flat-square)](https://github.com/M41NUL/X-ENCODER-) [![License](https://img.shields.io/badge/license-MIT-red?style=flat-square)](https://github.com/M41NUL/X-ENCODER-) [![Author](https://img.shields.io/badge/dev-CODEX-M41NUL-yellow?style=flat-square)](https://github.com/M41NUL) [![Telegram](https://img.shields.io/badge/Telegram-Channel-2CA5E0?style=flat-square&logo=telegram)](https://t.me/codexm41nul) [![Stars](https://img.shields.io/github/stars/M41NUL/X-ENCODER-?style=flat-square&color=yellow)](https://github.com/M41NUL/X-ENCODER-/stargazers) [![Forks](https://img.shields.io/github/forks/M41NUL/X-ENCODER-?style=flat-square&color=blue)](https://github.com/M41NUL/X-ENCODER-/network/members) [![Issues](https://img.shields.io/github/issues/M41NUL/X-ENCODER-?style=flat-square&color=red)](https://github.com/M41NUL/X-ENCODER-/issues) [![Last Commit](https://img.shields.io/github/last-commit/M41NUL/X-ENCODER-?style=flat-square&color=brightgreen)](https://github.com/M41NUL/X-ENCODER-/commits/main) [![Repo Size](https://img.shields.io/github/repo-size/M41NUL/X-ENCODER-?style=flat-square&color=orange)](https://github.com/M41NUL/X-ENCODER-)
## 📌 什么是 X-ENCODER? **X-ENCODER** 是一款基于 Termux 的 Python 源代码保护工具。它使用 **3 层混淆** 对你的 `.py` 文件进行编码 —— 使其极难被读取或进行逆向工程,同时仍然可以完全执行。 ## 🔐 编码层 ``` Original .py ──► Marshal (bytecode) ──► Zlib (compress) ──► Base64 (encode) ──► Encoded .py ``` | 层级 | 方法 | 用途 | |-------|--------|---------| | 第 1 层 | `marshal` | 将源代码编译为 Python 字节码 (code object) | | 第 2 层 | `zlib` | 压缩 marshalled bytes (level 9) | | 第 3 层 | `base64` | 将压缩后的字节编码为 ASCII 安全的字符串 | 输出的文件是**自执行**的 —— 不需要解码器。只需像平时一样使用 `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 ``` ## ⚡ 安装与使用 ### 步骤 1 — 克隆仓库 ``` apt update && apt upgrade -y pkg install git -y git clone https://github.com/M41NUL/X-ENCODER-.git cd X-ENCODER- ``` ### 步骤 2 — 运行安装程序 ``` bash installer.sh ``` 安装程序将会: - 更新 Termux 软件包 - 安装 Python、pip、git - 通过 `termux-setup-storage` 请求 Android `/sdcard` 存储权限 - 为每个步骤显示动画进度条 - 在 **3 秒倒计时**后自动启动 `main.py` ### 步骤 3 — 手动运行(首次安装后) ``` cd X-ENCODER- python main.py ``` ## 🖥️ 所有命令 | 命令 | 描述 | |---------|-------------| | `git clone https://github.com/M41NUL/X-ENCODER-.git` | 克隆仓库 | | `cd X-ENCODER-` | 进入项目文件夹 | | `bash installer.sh` | 安装依赖并启动 | | `python main.py` | 手动运行工具 | | `git pull origin main` | 手动拉取最新更新 | | `rm -rf X-ENCODER-` | 删除/卸载该工具 | ## 🗑️ 卸载 要从你的设备中彻底移除 X-ENCODER: ``` 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/ ``` 文件夹内的所有 `.py` 文件都将被编码。输出文件夹将作为输入文件夹的同级目录创建。 ## 📝 编码后的文件头 每个编码后的文件顶部都包含此注释块: ``` # 工具 : X-ENCODER # 类型 : Marshal + Zlib + Base64 # 日期 : 2025-01-01 12:00:00 # 开发者 : Md. Mainul Islam (CODEX-M41NUL) # GitHub : https://github.com/M41NUL # 警告 : 此文件已编码。请勿编辑。 ``` ## 🎨 颜色方案 | 颜色 | Hex / ANSI | 用途 | |-------|-----------|-------| | 绿色 | `\033[92m` | 主要颜色,成功 | | 红色 | `\033[91m` | 错误,次要颜色 | | 橙色 | `\033[38;5;208m` | 强调,提示 | | 白色 | `\033[97m` | 暗色文本,正文 | ## 👨‍💻 开发者
| | | |--|--| | **Name** | Md. Mainul Islam | | **Brand** | CODEX-M41NUL | | **GitHub** | [github.com/M41NUL](https://github.com/M41NUL) | | **Telegram** | [t.me/mdmainulislaminfo](https://t.me/mdmainulislaminfo) | | **Channel** | [t.me/codexm41nul](https://t.me/codexm41nul) | | **Group** | [t.me/codex_m41nul](https://t.me/codex_m41nul) | | **YouTube** | [youtube.com/@codexm41nul](https://youtube.com/@codexm41nul) | | **Email** | devmainulislam@gmail.com |
## ⭐ 支持 如果这款工具对你有帮助,请在 GitHub 上给它点个 **star**,并加入 Telegram 频道获取更新! [![Star on GitHub](https://img.shields.io/github/stars/M41NUL/X-ENCODER-?style=social)](https://github.com/M41NUL/X-ENCODER-) [![Telegram](https://img.shields.io/badge/Join-Telegram%20Channel-2CA5E0?style=flat-square&logo=telegram)](https://t.me/codexm41nul)
Made with ❤️ by CODEX-M41NUL | © 2026
标签:Python, SOC Prime, Termux, 代码保护, 代码混淆, 开发工具, 无后门, 逆向工具