jh_pyenc - Python代码 加密? 处理工具 / Python Code (encryption?) Processing Tool
Project description
jh_pyenc - Python代码 加密? 处理工具 / Python Code (encryption?) Processing Tool
其实就是我嫌自己写的代码太丑,干脆一不做二不休,全给它糊成乱码,眼不见心不烦。小打小闹用用没问题,想逆回去也不是不行,就是得花点时间。要是想要正经加密?出门左拐,好走,拜了个拜~
This is basically for when I can't stand looking at my own code anymore, so I just nuke it into unreadable chaos. Works for small stuff — feel free to play around, and hey, you can reverse it if you try hard enough. But production-level encryption? Oh honey, take a left and don't let the door hit you on the way out, lol.
安装 / Installation
pip install jh_pyenc
依赖 / Dependencies
- cryptography, cython, setuptools
- C compiler / C编译器 (Visual Studio Build Tools / Xcode CLT / build-essential)
快速开始 / Quick Start
jh_pyenc ./myproject -p "my_password"
命令 / Commands
jh_pyenc <directory> [options]
选项 / Options
| Option | 说明 / Description |
|---|---|
-p, --password |
密码 / Password |
--whl |
打包运行时为whl / Package runtime as .whl |
--no-backup |
不备份原文件 / Skip backup |
安全选项 / Security Options
| Option | 说明 / Description |
|---|---|
--expire DATE |
过期日期 / Expiration date YYYY-MM-DD |
--mac MAC |
绑定MAC(可多次) / Bind MAC address (repeatable) |
--remote URL |
远程验证地址 / Remote validation endpoint |
--anti-debug |
启用反调试(请注意这个功能有问题) / Enable anti-debugging (not use) |
--junk |
启用垃圾代码 / Enable junk code injection |
--debug-threshold N |
反调试时间阈值 / Anti-debug threshold in seconds (default: 0.3) |
--trap MODE |
陷阱模式 / Trap mode: random/exit/hang/error/silent |
--env-bind |
启用环境绑定 / Enable environment binding |
远程验证服务端示例 / Remote Validation Server
from http.server import HTTPServer, BaseHTTPRequestHandler
import json
AUTHORIZED = {"ff:ff:ff:ff:ff:ff"}
class Handler(BaseHTTPRequestHandler):
def do_POST(self):
length = int(self.headers['Content-Length'])
data = json.loads(self.rfile.read(length))
machine = data.get('machine', '')
valid = machine in AUTHORIZED
self.send_response(200)
self.send_header('Content-Type', 'application/json')
self.end_headers()
self.wfile.write(json.dumps({'valid': valid}).encode())
HTTPServer(('0.0.0.0', 5000), Handler).serve_forever()
示例 / Examples
# 基础 / Basic
jh_pyenc ./myproject -p "secret"
# 带过期 / With expiration
jh_pyenc ./myproject -p "secret" --expire 2026-12-31
# MAC绑定 / MAC binding
jh_pyenc ./myproject -p "secret" --mac ff:ff:ff:ff:ff:ff
# 打包whl / Package as wheel
jh_pyenc ./myproject -p "secret" --whl
# 全量保护 / Full protection
jh_pyenc ./myproject -p "secret" --anti-debug --junk --trap exit
# 远程验证 / Remote validation
jh_pyenc ./myproject -p "secret" --remote https://api.example.com/verify
注意事项 / Notes
- 请妥善保管密码 / Keep your password safe
- 原文件自动备份到
xxx_bak// Originals backed up toxxx_bak/ - 处理后需要pyruntime才能运行 / pyruntime required to run processed files
- 本工具为混淆处理,无法达到生产级安全标准 / This is an obfuscation tool, not production-grade security
- 请为自己的行为负责哦亲 / Please take responsibility for your actions, dear.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jh_pyenc-0.0.5.tar.gz.
File metadata
- Download URL: jh_pyenc-0.0.5.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a97ab731b283bba535801afa83d9ffe94c72a0ee06bb672fd58a415b64681342
|
|
| MD5 |
faf7bcfaecc0cdf6dad7bd2d47e0d78e
|
|
| BLAKE2b-256 |
7c0b606ea98cb073ed0657f197086b2e17d56b72cc52265516d25a14976158d2
|
File details
Details for the file jh_pyenc-0.0.5-py3-none-any.whl.
File metadata
- Download URL: jh_pyenc-0.0.5-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc02dae57348a1162c50b8f81972aa66d92f43a2c9e2e44e1b04574f25a100ee
|
|
| MD5 |
ca93ebc60cd07613e0b34edb61186982
|
|
| BLAKE2b-256 |
f0976a85acac5d9d031bcb772a03ec0223bfda3c3c5551c5466e01f22e652e91
|