代码混淆
Project description
Pylicenser
提供了2种加密的方式:
- 基于sourcedefender的原理自己加以实现的,更好的兼容了目录级别的代码加密。
- 使用Cython进行代码封装,也支持了目录级别的文件加密。
此外,Pylicenser还支持运行时的过期校验——即设置ttl,服务启动后,Pylicenser会在其运行过程中时检测失效时间。
安装
pip install pylicenser
加密
usage: pylicenser encrypt [-h] [--ttl TTL] [--dist DIST] str [str ...]
positional arguments:
str 待加密的文件或文件夹
optional arguments:
-h, --help 帮助信息
--ttl TTL 有效日期,默认:0,单位:seconds。示例: 1s、2d、3m、4h (default: 0)
--dist DIST 输出目录,默认当前dist目录 (default: ./dist)
--verbose 是否打印日志 (default: False)
运行加密代码
usage: pylicenser run [-h] script ...
positional arguments:
script py脚本文件
args 脚本需要的参数
optional arguments:
-h, --help 帮助信息
--verbose 是否打印日志 (default: False)
使用Cython方式加密
采用该方式需要预先安装Cython,安装方式如下:
pip install Cython --install-option="--no-cython-compile"
使用方式如下:
usage: pylicenser cython [--dist DIST] [-h] str [str ...]
positional arguments:
str 待编译的代码文件或文件夹
optional arguments:
--dist DIST 输出目录,默认当前dist目录 (default: ./dist)
-h, --help 帮助信息
--verbose 是否打印日志 (default: False)
Cython加密后,不影响代码原有使用方式,即原来脚本怎么运行,加密后还是怎么运行。
相较于第一种加密,Cython加密具有平台依赖性,即在darwin上加密的代码在win或者linux下不一定能运行。
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
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 pylicenser-0.0.13-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl.
File metadata
- Download URL: pylicenser-0.0.13-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.9, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c1c58ebf9d72dcbe593ad5d99711c317dad004380f587b1bc263162d79f5fe0
|
|
| MD5 |
ef9634617ecb907359217e59ed8fc6b9
|
|
| BLAKE2b-256 |
0d9536cb93205354d0dcc87415b8cd2a1a6b90c09382fd8d23c6eee289f5130e
|
File details
Details for the file pylicenser-0.0.13-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl.
File metadata
- Download URL: pylicenser-0.0.13-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.8, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c7d45209e98f18682a20daa47416307f94ff9b246cfbb0a6edee52edad8e3e6
|
|
| MD5 |
726845a1aea497ab5f0fee550ad07fc3
|
|
| BLAKE2b-256 |
0b7fae9ce277d263c10f37e38498167f9b83601ffbf04d7b0e2dce4f0d21700c
|
File details
Details for the file pylicenser-0.0.13-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl.
File metadata
- Download URL: pylicenser-0.0.13-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.7m, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
deff861ad91530cb77f9deb3ceaa436e11796905c0736e5ef1bd61e32a286d27
|
|
| MD5 |
37d69ee72923bb2cb73601e8190c5084
|
|
| BLAKE2b-256 |
ca0cee8531e89dcec0700c4e05419a57e8b6208a754a06130465e3f833af448d
|
File details
Details for the file pylicenser-0.0.13-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl.
File metadata
- Download URL: pylicenser-0.0.13-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.6m, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78ee8a447c196435ee002533fd53d9498a6adedb81809b4866d7bd4ddade15cf
|
|
| MD5 |
0307209b5a341e707ea06d685f0726e0
|
|
| BLAKE2b-256 |
d593769ca574688d0988a545e6ec1bf93ea3b1d2cecc202287cde9cddbe7ded7
|