Python代码处理工具 - 简单加密处理
Project description
# jh_pyenc - Python Code Processing Tool (Ultimate Hardened Edition)
## Installation
```bash
pip install jh_pyenc
```
## Dependencies
- cryptography
- cython
- setuptools
- C compiler required (Visual Studio Build Tools / Xcode CLT / build-essential)
## Quick Start
```bash
jh_pyenc ./myproject -p "my_password"
```
## Commands
```bash
jh_pyenc <directory> [options]
```
### Options:
| Option | Description |
|--------|-------------|
| `-p, --password` | Password (default: default_key_2024) |
| `--whl` | Package runtime as .whl file |
| `--no-backup` | Do not backup original files |
### Security Options:
| Option | Description |
|--------|-------------|
| `--expire DATE` | Expiration date YYYY-MM-DD |
| `--mac MAC` | Bind to MAC address (can specify multiple times) |
| `--remote URL` | Remote validation URL |
| `--no-anti-debug` | Disable anti-debugging |
| `--no-junk` | Disable junk code insertion |
| `--debug-threshold` | Anti-debugging time threshold (default: 0.3 seconds) |
| `--trap MODE` | Handler mode: random/exit/hang/error/silent |
| `--env-bind` | Enable environment binding |
## Examples
```bash
# Basic processing
jh_pyenc ./myproject -p "secret"
# With expiration
jh_pyenc ./myproject -p "secret" --expire 2025-12-31
# With MAC binding
jh_pyenc ./myproject -p "secret" --mac aa:bb:cc:dd:ee:ff
# Package as wheel
jh_pyenc ./myproject -p "secret" --whl
```
## Important Notes
- Please keep your password safe and secure
- Original files are automatically backed up to `xxx_bak/` directory
- After processing, the corresponding pyruntime is required to run; can be placed in site-packages for convenient access
- This is a simple obfuscation tool and does not meet production-grade security standards
---
## 中文说明
### 安装
```bash
pip install jh_pyenc-0.0.3-py3-none-any.whl
```
### 依赖
- cryptography
- cython
- setuptools
- 需要 C 编译器 (Visual Studio Build Tools / Xcode CLT / build-essential)
### 快速开始
```bash
jh_pyenc ./myproject -p "my_password"
```
### 命令
```bash
jh_pyenc <目录> [选项]
```
### 选项:
| 选项 | 说明 |
|------|------|
| `-p, --password` | 密码 (默认: default_key_2024) |
| `--whl` | 打包运行时为 .whl 文件 |
| `--no-backup` | 不备份原文件 |
### 安全选项:
| 选项 | 说明 |
|------|------|
| `--expire DATE` | 过期日期 YYYY-MM-DD |
| `--mac MAC` | 绑定MAC地址 (可多次指定) |
| `--remote URL` | 远程验证URL |
| `--no-anti-debug` | 关闭反调试 |
| `--no-junk` | 关闭垃圾代码 |
| `--debug-threshold` | 反调试时间阈值 (默认: 0.3秒) |
| `--trap MODE` | 处理模式: random/exit/hang/error/silent |
| `--env-bind` | 启用环境绑定 |
### 示例
```bash
# 基础处理
jh_pyenc ./myproject -p "secret"
# 带过期时间
jh_pyenc ./myproject -p "secret" --expire 2025-12-31
# 绑定MAC地址
jh_pyenc ./myproject -p "secret" --mac aa:bb:cc:dd:ee:ff
# 打包为wheel
jh_pyenc ./myproject -p "secret" --whl
```
### 注意事项
- 请妥善保管处理密码
- 原文件自动备份到 `xxx_bak/` 目录
- 处理后需要相应的 pyruntime 才能运行,可以放到 site-packages 方便调用
- 只是简单的混淆处理,无法达到生产环境的安全水准
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
jh_pyenc-0.0.3.tar.gz
(10.5 kB
view details)
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
jh_pyenc-0.0.3-py3-none-any.whl
(10.7 kB
view details)
File details
Details for the file jh_pyenc-0.0.3.tar.gz.
File metadata
- Download URL: jh_pyenc-0.0.3.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
868add426f6d1b27e4943a684e54c69e20b96fb4afbcf9cc7e200d4ec4f771ed
|
|
| MD5 |
264d3ad39e7d7d411d4050f456445025
|
|
| BLAKE2b-256 |
7d3c28af8c81ab9fbec8357ec943be9606d3e84ef981c620166dca0459902d30
|
File details
Details for the file jh_pyenc-0.0.3-py3-none-any.whl.
File metadata
- Download URL: jh_pyenc-0.0.3-py3-none-any.whl
- Upload date:
- Size: 10.7 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 |
67fbb08db4b1f8bc4126be9009372ab96184f5ccad01e4c0813e896d676c1c84
|
|
| MD5 |
17cefd613410660637e7cceaa60cf2a8
|
|
| BLAKE2b-256 |
3911d6608571269c789f65b46d5b677415b58f3f0b2297ea47f73007cff05282
|