保护 Ruby 代码 [英] Protecting Ruby Code

查看:68
本文介绍了保护 Ruby 代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Ruby 在带有自定义 Linux 内核的基于 ARM 的嵌入式板上开发一个商业项目.项目和设备的目标工作区是封闭环境,没有以太网、inernet、I/O 设备等……我想保护我的代码/程序,以便;它只能在我让的特定机器上工作(所以;人们不能只是将我的代码/程序复制并粘贴到他们的嵌入式板上并在没有许可的情况下运行它).这可能可以通过机器的 MAC 地址来完成;我对这个问题没有任何经验.我想,只是一个简单的 if(device.MACAddr == "XX:XX....XX") 不会可靠(更不用说人们可以轻松地从我的代码中删除支票).我不能使用一些 ruby​​ 混淆器,这是我通过谷歌找到的,因为;设备不运行 ruby​​-external-C-libraries 或类似的东西,只有纯 ruby​​ 代码.

I'm developing a commercial project on an ARM based embedded board with a custom Linux kernel on it, using Ruby. Target workspace of the project and the device is a closed-environment, no ethernet, inernet, I/O devices etc... I want to protect my code/program so that; it'll only work on the specific machines I let (so; people cant just copy and paste my code/program on to their embedded boards and run it w/o permission). This can probably done with the machine's MAC address tho; I don't have any experience on the subject. I guess, just a simple if(device.MACAddr == "XX:XX....XX") wouldn't be depandable (not to mention people can just easily delete the check from my code). I can't use some ruby obfuscators, which I found thru google, beacuse; the device doesnt run ruby-external-C-libraries or such stuff, only pure ruby code.

所以;你有什么建议,我应该采取什么样的方法?

So; what are your suggestions, what type of approach should I take?

推荐答案

这与 DRM 的问题是同构的.你给了一个人一把锁和那把锁的钥匙,并试图阻止那个人以你不喜欢的方式使用钥匙.

This is isomorphic to the problem of DRM. You're giving a person both a lock and the key to that lock, and trying to stop that person from using the key in a way you don't like.

因此,我建议使用与其他 DRM 用户相同的方法:将您的条款放入许可中,如果他们违反了许可,则可以起诉他们.无论如何,您需要使用法律来执行许可的其他条款.

Therefore, I suggest using the same methods that other DRM users do: put your terms in the license, and sue them if they violate it. You need to use the law to enforce the other terms of the license, anyway.

这篇关于保护 Ruby 代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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