如何制作它,以便用户在分发时无法修改SQLite3数据库

发布于 2025-01-28 23:32:41 字数 273 浏览 4 评论 0原文

我创建了一个使用数据库的Python脚本,将.EXE编译到文件时必须在文件中传递。我想知道我向文件提供的用户是否可能无法编辑数据库(以一种简单的方式)

“在此处输入映像”

我希望该文件不可编辑

I have created a python script that uses a database, which I have to pass in the file when compiling the .exe to a file. I would like to know if it is possible that the user to whom I give the file cannot edit the database (in a simple way)

enter image description here

I would like the file to be uneditable

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

迷路的信 2025-02-04 23:32:41

SQLite本身提供加密功能。但是它需要一些额外的许可证。

您可以检查Wiki: https://www.sqlite.org/请参阅/doc/preasure/www/readme.wiki
如果您可以保护加密密钥,则可以保护数据库文件。
过去,我曾经使用与Sqlite集成的See。使用数据运输应用程序时,对设备应用程序有帮助。

如果您想自己自定义加密,是的,可以检查一些OpenSource密码库以集成它。

SQLite provides encryption functionality by itself. But it need some extra licence.

You can check the wiki: https://www.sqlite.org/see/doc/release/www/readme.wiki
If you can protect the encryption key, you will be able to protect the db file.
In the past, I've ever use the SEE integrated with sqlite. It's helpful in device application when shipping the app with data.

If you want to customize the encryption yourself, yes, you can check some opensource cryptography library to integrate it.

冰葑 2025-02-04 23:32:41

可以使用

因此无法使本地文件完全不可编辑,

It would be possible to encrypt the file using a module like cryptography.
But a determined attacker will always manage to find the encryption key in the executable (and this would probably cause some problems in the code)

To my knowledge, it is not possible to make a local file completely uneditable

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文