python源码加密

Cython

这个是把python转成C,然后编译成机器码,加密效果最好。

感觉用这个也可以,把部分关键模块加密就行。

PyInstaller

What PyInstaller Does and How It Does It — PyInstaller 4.5.1 documentation

好像只是简单的组合pyc文件,要想真加密还得Cython

不过PyInstaller挺好用,用着挺方便。

在加密flask出现了一些静态文件(html)依赖丢失的问题,有点麻烦,主要是flasgger在线文档看不了了,要是不要这个文档倒也可以运行,其次好像exe加载速度有点慢。

image-20211020232923996

参考博客

加密你的Python源码顺便再打个包如何? - 知乎 (zhihu.com)

如何保护你的 Python 代码 (一)—— 现有加密方案 - 知乎 (zhihu.com)

基础教程 | Cython 官方文档中文版 (gitbooks.io)

10分钟入门Cython - 知乎 (zhihu.com)

Python PyInstaller安装和使用教程(详解版) (biancheng.net)

用pyinstaller -F 打包flask项目成exe文件时报错jinja2.exceptions.TemplateNotFound: template.html_yumin1997的博客-CSDN博客

用pyinstaller -F 打包含pyecharts库的py文件成exe文件时报错jinja2.exceptions.TemplateNotFound: template.html怎么解决_琛琛同学的博客-CSDN博客

Pyinstaller 打包Python项目为exe的过程 - 知乎 (zhihu.com)

PyInstaller Quickstart — PyInstaller bundles Python applications

posted @ 2023-05-08 16:16  张浩东zhanghad  阅读(120)  评论(0编辑  收藏  举报