PyInstaller 加密 --key [英] PyInstaller Encryption --key

查看:436
本文介绍了PyInstaller 加密 --key的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图理解为什么 PyInstaller 文档指出可以轻松提取用于加密 Python 源代码的 --key 参数:

I'm trying to understand why PyInstaller documentation states that the --key argument to encrypt Python source code can be easily extracted:

此外,通过在 PyInstaller 的命令行上指定加密密钥,可以使用 AES256 混淆 Python 字节码.请注意,提取密钥并取回原始字节码仍然很容易,但它应该可以防止大多数形式的随意"篡改.

我对 AES-256 的基本理解是,如果没有人拥有您指定的加密密钥,他们将无法轻松"提取它

My basic understanding of AES-256 is that if no one has the encryption key you specify, they can't extract it "easily"

有没有人有更好的理解?

Does anyone have better understanding ?

推荐答案

Pyinstaller 可选择使用非常强大的方法加密 Python 源代码.

Pyinstaller optionally encrypts the python sources with a very strong method.

当然,如果没有密钥,几乎不可能提取文件.

Of course without the key it is nearly impossible to extract the files.

但是仍然需要在运行时访问源代码,否则程序无法运行(或者有人每次都必须提供密码,例如受保护的 excel 文件).

BUT the sources still need to be accessed at run time or the program couldn't work (or someone would have to provide the password each time, like protected excel files for instance).

这意味着密钥位于已安装软件中的某个位置.而且由于所有这些东西都是开源的,查看源代码会告诉您 PyInstaller 嵌入密钥的位置.当然,这不是微不足道的,但也不是破解加密的问题,只是逆向工程 - 添加 - 可用的源.

It means that the key lies somewhere embedded in the installed software. And since all this stuff is open source, looking at the source code tells you where PyInstaller embeds the key. Of course, it's not trivial, but not an encryption-breaking problem, just reverse engineering with - added - the source available.

这篇关于PyInstaller 加密 --key的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆