编译脚本文件Lua或Python

发布于 2024-11-11 18:07:40 字数 1435 浏览 5 评论 0原文

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

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

发布评论

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

评论(3

娇纵 2024-11-18 18:07:40

您可以使用 luac 编译 Lua 脚本:

luac -s -o yourscript.luc yourscript.lua

使用标志 < code>-s 还将删除调试信息,从而使其也更小一些。

You can compile Lua scripts with luac:

luac -s -o yourscript.luc yourscript.lua

Using the flag -s will also remove debugging information, thus making it also a little bit smaller.

十六岁半 2024-11-18 18:07:40

您将无法轻易隐藏这一点。您可以即时加密和解密。问题是人们将能够查看您的进程内存并清楚地看到代码。如果你想阻止人们更改 lua,你可以创建一个哈希值,在每次运行时都会检查文本文件。

You will not be able to hide this easily. You can encrypt and decipher on the fly. The problem is that people will be able to look at you're process memory and see the code clear as day. If you want to prevent people from changing the lua you can create a hash which the text file is checked against on each run.

灰色世界里的红玫瑰 2024-11-18 18:07:40

(对于 Lua)

取决于它的安全程度。为了防止愚蠢的编辑,您只需更改扩展名,并配置路径以无论如何识别它。

为了阻止那些知道如何更改扩展名的人,您可以发送使用 luac 编译的文件。为了破译你已经必须付出相当大的努力。

但要真正节省,我想唯一的方法是加密/签名代码,也许修改核心,使其只运行签名检查正常或可以解密的文件。

(For Lua)

Depends on how safe it should be. For keeping out dumb edits you can just change the extension, and configure the path to recognize it anyhow.

For keeping out people who know how to change extensions, you can ship files compiled with luac. For deciphering that you already have to put considerable effort in it.

But to be really save I guess the only way is to encrypt/sign the code, and perhaps modify the core such that it'll only run files who's signature checks out to be OK, or which can be decrypted.

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