Skip to main content

代码混淆

Project description

Pylicenser

提供了2种加密的方式:

  1. 基于sourcedefender的原理自己加以实现的,更好的兼容了目录级别的代码加密。
  2. 使用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)

运行加密代码

usage: pylicenser run [-h] script ...

positional arguments:
  script      py脚本文件
  args        脚本需要的参数

optional arguments:
  -h, --help  帮助信息

使用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   帮助信息

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pylicenser-0.0.12-cp39-cp39-manylinux1_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.9

pylicenser-0.0.12-cp38-cp38-manylinux1_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.8

pylicenser-0.0.12-cp37-cp37m-manylinux1_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.7m

pylicenser-0.0.12-cp36-cp36m-manylinux1_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.6m

pylicenser-0.0.12-cp36-cp36m-macosx_10_9_x86_64.whl (442.8 kB view details)

Uploaded CPython 3.6mmacOS 10.9+ x86-64

File details

Details for the file pylicenser-0.0.12-cp39-cp39-manylinux1_x86_64.whl.

File metadata

  • Download URL: pylicenser-0.0.12-cp39-cp39-manylinux1_x86_64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.0.post20201006 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.6.12

File hashes

Hashes for pylicenser-0.0.12-cp39-cp39-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e5536109f300148ed555b2e19b37ee2ee7d4b4ec14bbe81dc5d622135bdd4654
MD5 3c27a539ebfaf3f63dfec61cf86ea5a0
BLAKE2b-256 ca6f9227a197d7ef57b40e97ee839bdaca6b4922aff710297f73a03c845c5be0

See more details on using hashes here.

File details

Details for the file pylicenser-0.0.12-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: pylicenser-0.0.12-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.0.post20201006 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.6.12

File hashes

Hashes for pylicenser-0.0.12-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 d3ffb5dd1783e95ecedb43291060fe0abb948061b9ac28c074d9e62da6b93202
MD5 f313bad11c69a7a45831d02d4fab9b33
BLAKE2b-256 4e0cca3a66aabcd1ba1fc5085ecd14aa353f9b1f8705eddce326fbc1bc9db783

See more details on using hashes here.

File details

Details for the file pylicenser-0.0.12-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: pylicenser-0.0.12-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.0.post20201006 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.6.12

File hashes

Hashes for pylicenser-0.0.12-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e57293881b3600ce9acee55fbe13e1903552d9877f44027f0637b11dae0f2020
MD5 21e1103143e0e19e5e6e491f69c33388
BLAKE2b-256 f3ea056b971a39f68e8ee336481a458f28ad488149885e8dde1966be1cf11b26

See more details on using hashes here.

File details

Details for the file pylicenser-0.0.12-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: pylicenser-0.0.12-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.0.post20201006 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.6.12

File hashes

Hashes for pylicenser-0.0.12-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 7f61e2da78d2b7dba3fb27759cab6c09f1b97e39bdf898b071bbc0b2580aeca5
MD5 513c9263bd56363b9d248a9cd8f55117
BLAKE2b-256 054921bb3676e103b1fc023945f477177f1faac2b59c67bab5194da346273d5e

See more details on using hashes here.

File details

Details for the file pylicenser-0.0.12-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: pylicenser-0.0.12-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 442.8 kB
  • Tags: CPython 3.6m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.0.post20201006 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.6.12

File hashes

Hashes for pylicenser-0.0.12-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 373f9c83f2950f3665518d533ae97b527ea6476d319d59d886e886c9fd37900a
MD5 36c4ce9487978941c346a91c720ae7d4
BLAKE2b-256 9bb4a4ec8a2cc8075bb86d0a5d3e6949eacef1fa30e384007033c0559a2cde1d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page