se-import: Modules import in a safe source protection, support for python module code and custom des encryption, ase decryption operation or custom decryption callback module loading
# -*- coding: utf-8 -*-
# @Time : 2021/11/10 11:22
'''
模块的安全导入,对python模块代码支持des和自定义加密,运行des解密或者自定义解密回调
'''
se_import demo:
# -*- coding: utf-8 -*-
# @Time : 2021/11/9 16:42
import sys
import se_import
print(dir(se_import))
#从内存加载模块
def test_load_mem():
s = "a = 100\nb=1000"
#自定义模块名
name = 'test_load_mem_test'
ret = se_import.load_module(name,s,name + '.py')
print(ret)
print(dir(ret))
print(ret.a)
print(ret.b)
#从内存加载模块,支持模块解密回调
def test_load_custom():
#从内存加载模块
s = "a = 100\nb=1000"
# 自定义模块名
name = 'load_module_custom_test'
ret= se_import.load_module_custom(name,s,name + '.py',lambda x:x + '\nadasdadada=1000')
print(ret)
print(dir(ret))
print(ret.a)
print(ret.b)
#从本地 ase加密文件加载模块
def test_save_load_asefile():
#模块ase 加密,保存到文件
infile = "./ase.py"
outfile = './ase.pys'
key = bytes([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])
iv = bytes([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])
#第一个参数类型是字符串 是文件名, bytes 则为二进制文件内容
ret = se_import.dump_module_to_asefile(infile, key, iv)
with open(outfile,mode='wb') as f:
f.write(ret)
#从文件加载加密模块
# 自定义模块名
infile = './ase.pys'
name = 'test_save_load_asefile_test'
ret2 = se_import.load_module_from_asefile(name,infile,name + '.py')
print(ret2)
print(dir(ret2))
if __name__ == '__main__':
test_save_load_asefile()
Metadata
Release files for se-import 0.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 2.7 MB
Release files / se_import-0.0.9-cp312-cp312-win_amd64.whl
| Download URL | se_import-0.0.9-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 230.2 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
6bf762ff4c56ef48ccda0ebae0c44470ae04b3a7b2514e57bbe67f22db5b3f99
|
|
BLAKE2b-256 checksum How to use checksums |
4b1159075de266522190077cba7f69a59e7a52b83b7d3cc540a673c6135dda10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.5.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.9
|
Release files / se_import-0.0.9-cp312-cp312-manylinux2014_x86_64.whl
| Download URL | se_import-0.0.9-cp312-cp312-manylinux2014_x86_64.whl |
|---|---|
| Size | 79.1 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
925c7b5959d7e75eaa153cf4b9ebeea1ad48026f4602ea2ff4f3cd744fe76f07
|
|
BLAKE2b-256 checksum How to use checksums |
c20d4b858628b371521e560aba764e48c4b8411cfc8011a4427f14e2f069b76b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Release files / se_import-0.0.9-cp312-cp312-manylinux2014_aarch64.whl
| Download URL | se_import-0.0.9-cp312-cp312-manylinux2014_aarch64.whl |
|---|---|
| Size | 75.7 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
43d54c5ebe8304290f524a7e5296ceae77cd88076a0f2c68c15c113cd5590fe8
|
|
BLAKE2b-256 checksum How to use checksums |
f32b9fd78d626f118922074137b5e06c099ebbc3517b7267edb3e350284c518c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Release files / se_import-0.0.9-cp311-cp311-win_amd64.whl
| Download URL | se_import-0.0.9-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 229.5 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
604f62d75a9a9f39b0d545adaa96a7fb6c15712b674cca17cecda9e9efbfc8d8
|
|
BLAKE2b-256 checksum How to use checksums |
58085ac84b2841dd6ec86e99168464b55610a201ce5e06d5c58a63a5e53f3360
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.5.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.9
|
Release files / se_import-0.0.9-cp311-cp311-manylinux2014_x86_64.whl
| Download URL | se_import-0.0.9-cp311-cp311-manylinux2014_x86_64.whl |
|---|---|
| Size | 78.6 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
f9746d63d600513cf3290299fc1ada7d8cf51a7928b0af0fd006fcc21d12515b
|
|
BLAKE2b-256 checksum How to use checksums |
edff9bab0f93e90122a5b21749b0ff89a9b86db9883aeb5cfb7d712cf2cb692c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Release files / se_import-0.0.9-cp311-cp311-manylinux2014_aarch64.whl
| Download URL | se_import-0.0.9-cp311-cp311-manylinux2014_aarch64.whl |
|---|---|
| Size | 75.4 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
21bef3d1b11a46a8dcbbb9f3d79b3b66e2e3806843d30dde89eb0f0d8ca259f9
|
|
BLAKE2b-256 checksum How to use checksums |
a3789c52bcae2ec8f7326aefe52183e5dcace0069edbad1267920367f1c3d5fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Release files / se_import-0.0.9-cp310-cp310-win_amd64.whl
| Download URL | se_import-0.0.9-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 229.2 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
69fbf779e1dea03e422a48b74701541e547368de5be6023932969ede86d660f9
|
|
BLAKE2b-256 checksum How to use checksums |
eaf6eb9c5d3072143ebac84a4aa71a897067671c839e8c0c91656f8466ba55c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.5.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.9
|
Release files / se_import-0.0.9-cp310-cp310-manylinux2014_x86_64.whl
| Download URL | se_import-0.0.9-cp310-cp310-manylinux2014_x86_64.whl |
|---|---|
| Size | 78.6 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
f48e208f99a7a66c2a5e9055d0a7b34ad890c422a794fb9e4e6ea8d72bcac571
|
|
BLAKE2b-256 checksum How to use checksums |
ece19ee09e58367418ecc091d67c0a4222ebd47ad31e06597a0d21aa48a76827
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Release files / se_import-0.0.9-cp310-cp310-manylinux2014_aarch64.whl
| Download URL | se_import-0.0.9-cp310-cp310-manylinux2014_aarch64.whl |
|---|---|
| Size | 75.4 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
6960499fd30a712445712efd68a9debed3c52e7ce6fe27aded2aff262f56b252
|
|
BLAKE2b-256 checksum How to use checksums |
3954563cc1d5b25b4c1a14774245c06e0a84cf87bd7ef8ca460a28443f12dade
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Release files / se_import-0.0.9-cp39-cp39-win_amd64.whl
| Download URL | se_import-0.0.9-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 228.9 kB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
7c131ecaaef805188cb5e43f1c658492c2eb0c4041fb1ea645e08c05355f374e
|
|
BLAKE2b-256 checksum How to use checksums |
990ae5e03189e6acfc5da7a316e936b6658dba3fdcb7c14e474231fcf73f17bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.5.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.9
|
Release files / se_import-0.0.9-cp39-cp39-manylinux2014_x86_64.whl
| Download URL | se_import-0.0.9-cp39-cp39-manylinux2014_x86_64.whl |
|---|---|
| Size | 78.9 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
2f7b7b99dee3c888d26c756f10502beccdcd79862fd5c2a269e152744a818f41
|
|
BLAKE2b-256 checksum How to use checksums |
b8ea125694f06fed2bdf846628a34209c748bc17dff0aff406b3159d1e94839c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Release files / se_import-0.0.9-cp39-cp39-manylinux2014_aarch64.whl
| Download URL | se_import-0.0.9-cp39-cp39-manylinux2014_aarch64.whl |
|---|---|
| Size | 75.3 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
41104a8182f1f24b4b7eb73c90e0e30deb3b36d0dd2d95c17114e428d3a4cbdf
|
|
BLAKE2b-256 checksum How to use checksums |
896a32b0769b7407b9f4930d31b03e2a9a2f1c7546dce759859553ca75d6f085
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Release files / se_import-0.0.9-cp38-cp38-win_amd64.whl
| Download URL | se_import-0.0.9-cp38-cp38-win_amd64.whl |
|---|---|
| Size | 229.4 kB |
| Tags | CPython 3.8 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
1ffdbbaf2cbe9b20de94c10de423ef2c5d0b6ead63116cb6237c7c8c51bf87fe
|
|
BLAKE2b-256 checksum How to use checksums |
f84ebef2187e301ea799016d935b61cb6ba5004c65f0aa91c6ec852ba3006681
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.5.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.9
|
Release files / se_import-0.0.9-cp38-cp38-manylinux2014_x86_64.whl
| Download URL | se_import-0.0.9-cp38-cp38-manylinux2014_x86_64.whl |
|---|---|
| Size | 78.6 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
3fc5b9883fd21b19e1b8a2d73f08b4f20aa03b9317dee76e531f8edf3d8dee03
|
|
BLAKE2b-256 checksum How to use checksums |
ff3d682578a074be0b2bbfaa3e533382e2100fe5ca6184ec4962f947ea1f87f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Release files / se_import-0.0.9-cp38-cp38-manylinux2014_aarch64.whl
| Download URL | se_import-0.0.9-cp38-cp38-manylinux2014_aarch64.whl |
|---|---|
| Size | 75.1 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
adc382487bd23fff502fe9971e8129b8d37bd0309c080b9edee7b85ef00968cc
|
|
BLAKE2b-256 checksum How to use checksums |
6842659109149daa698b960f68b48ae9c1687ec603a7b8c8d6650b01da122429
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Release files / se_import-0.0.9-cp37-cp37m-win_amd64.whl
| Download URL | se_import-0.0.9-cp37-cp37m-win_amd64.whl |
|---|---|
| Size | 229.5 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Windows x86-64 |
|
SHA-256 checksum How to use checksums |
fa5627a56770595a9cf02fe0a2270d046299bc162ac0a09409056e3577e3bc4d
|
|
BLAKE2b-256 checksum How to use checksums |
666937615bf5ba4bb948fe4595647dd6ad203680687e5682757ca59863d76cc8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.5.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.9
|
Release files / se_import-0.0.9-cp37-cp37m-manylinux2014_x86_64.whl
| Download URL | se_import-0.0.9-cp37-cp37m-manylinux2014_x86_64.whl |
|---|---|
| Size | 81.1 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
c3c181a87dd1f7c1be3cfe59677af64db1be0fa4ab8ee87a11d9f0db2e81e6cc
|
|
BLAKE2b-256 checksum How to use checksums |
e7e6606921f61f33079541810cab7f6131e54a2944e256dd85fef9ef1ff79e6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Release files / se_import-0.0.9-cp37-cp37m-manylinux2014_aarch64.whl
| Download URL | se_import-0.0.9-cp37-cp37m-manylinux2014_aarch64.whl |
|---|---|
| Size | 78.3 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
ff249eb040472f50b2d68833a94e8823d012be8cfaf726624e2630e19c33894c
|
|
BLAKE2b-256 checksum How to use checksums |
b77d18d05af4a9f219fb7affd1fa33de1d854b2bd149e748c497b59079d0644e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Release files / se_import-0.0.9-cp36-cp36m-win_amd64.whl
| Download URL | se_import-0.0.9-cp36-cp36m-win_amd64.whl |
|---|---|
| Size | 229.2 kB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Windows x86-64 |
|
SHA-256 checksum How to use checksums |
54b59d5f3536c5dc6bf53995b4f6d900f56b593e60d32559674da624e0969f44
|
|
BLAKE2b-256 checksum How to use checksums |
81d8988185d272835cba7be6722eb2481f5b182c63beed087898bef74f0b5ac4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.5.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.9
|
Release files / se_import-0.0.9-cp36-cp36m-manylinux2014_x86_64.whl
| Download URL | se_import-0.0.9-cp36-cp36m-manylinux2014_x86_64.whl |
|---|---|
| Size | 81.1 kB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
f7907aef49228ed333730d654776b4c00c5b94906716688e8a6dad9be5334997
|
|
BLAKE2b-256 checksum How to use checksums |
e94ef5a7e5be67f3fd73890bdb2fdd631b06304458785e131cd84cbc51f26a20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Release files / se_import-0.0.9-cp36-cp36m-manylinux2014_aarch64.whl
| Download URL | se_import-0.0.9-cp36-cp36m-manylinux2014_aarch64.whl |
|---|---|
| Size | 78.2 kB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
aae1cb097790978c51bf82ca351b9eb3371c04165347bbb86f803ffa12d5b566
|
|
BLAKE2b-256 checksum How to use checksums |
5c590699e59b4c0fc6913fe06064ea827da306a73888d6d8167e99f743911d7d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Security for se-import 0.0.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.