如何将软件绑定mac地址?
我写了一个软件,我想绑定到mac。有什么特定的算法可以将mac地址与我的软件绑定吗?谢谢您的帮助! 编辑: 我想根据用户的mac地址提供序列号。
I have written a software which I would like to bind to mac. Is there any specific algorithm to bind mac address with my software? Thank you for help !
Edit:
I want to provide serial number according to user's mac address.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
上面的评论是正确的 - MAC 地址广泛用于节点锁定,但它是一个糟糕的选择,因为它很容易在操作系统中更改。
更安全的方法是使用硬件和软件系统参数的组合,例如硬盘 ID、系统名称、用户操作系统登录名、CPU ID 等。可用的选择将取决于您使用的特定操作系统和编程语言。
但是,为了避免出现问题,我建议您考虑以下问题:
这些问题会导致自制的许可系统惹恼合法用户,并且不能非常安全地抵御潜在的黑客。
商业许可制度当然应该已经解决了这些问题和其他问题。
The comment above is right - the MAC address is widely used for node-locking, but it is a poor choice as it is easily changed in OS.
A more secure approach is to use a combination of hardware and software system parameters, such as hard disk ID, system name, user OS login name, CPU ID etc.. The selection available will depend on the specific OS and programming language you use.
However, to avoid problems down the road, I'd suggest you think about the following:
These are the kinds of issues that cause home-built licensing systems to annoy legitimate users, and not be very secure against would-be hackers.
Commercial licensing systems should of course have dealt with these and other issues already.
将MAC地址写入一种许可证文件中。
启动时读取 MAC 地址并将其与配置的进行比较。
如果不等于-->因错误而停止。
要从 mac 地址创建唯一的序列号,您必须对 macaddress 应用算法。有一些商业工具可以为您提供专业帮助。
关于许可的一些想法可以在此处和<一个href="https://stackoverflow.com/questions/175857/how-do-you-protect-your-commercial-application-from-being-installed-on-multiple/175935#175935">此处
Write MAC Adress into a kind of license file.
On startup read the MAC-Adress and compare it with configured.
If not equal --> stop with error.
To create a unique serial number out of a mac address you have to apply an algorithm to macaddress. There are some comercial tools for that for you professionally.
Some thoughts to licensing can be found here and here
我认为您希望实现应用程序对特定设备的某种节点锁定。如果是这样,您可能会失望地发现 MAC 地址并不总是设备上的持久值。事实上,某些设备具有多个 MAC 地址,因此在寻找要绑定的持久硬件 ID 时,它并不是一个特别可靠的值。
我们在 LicenseSpring 上对设备进行节点锁定许可证的解决方案(我们专门从事此类工作)是通过散列我们在设备上读取的某些硬件的序列号(例如 CPUID + BaseboardID)来生成设备指纹+ 系统磁盘ID)。当最终用户检索许可证密钥时,他们使用该哈希值以及许可证密钥来执行许可证检查,该检查是动态计算的。许可证密钥设置为只能在有限数量的设备上使用,因此如果其他设备尝试使用该许可证密钥,它们将计算出不同的 hardwareID 并被阻止。
只要您以相同的方式对这些序列号进行哈希处理,您就不会遇到任何麻烦...
您可以在密钥本身中存储信息,例如产品信息/设备信息等。
但我也不建议这样做。主要是因为密钥中只能容纳这么多信息,因此逆向工程变得非常容易。
相反,我建议您使用在线许可证检查的服务器响应来发回许可证权利以及签署服务器响应,并使用它来控制应用程序的状态。
I take it you're looking to achieve some sort of node-locking of your app to a specific device. If so, you might be disappointed to learn that the MAC address is not always a persistent value on a device. In fact, some devices have multiple MAC addresses, so it's not a particularly reliable value to use when looking to find a persistent
hardware ID
to bind to.Our solution for Node-Locking Licenses to a device at LicenseSpring (we specialize in this sort of stuff) is that we generate a device fingerprint by hashing the serial numbers of some of the hardware we read on the device (such as the CPUID + BaseboardID + SystemDiskID). When the end user retrieves the license key, they use that hash along with the license key to perform a license check, which is computed on the fly. The license key is set to only be usable on a finite number of devices, so if another device tries to use the license key, they will compute a different hardwareID and be blocked.
So long as you're hashing those serial numbers in the same way, you won't run into any trouble...
You CAN store information in the key itself, such as product info / device info etc.
but I would also advise against that. Mainly because there's only so much info that can fit into a key, and then it makes it quite easy to reverse engineer.
Instead, I'd suggest you use the server response from the online license check to send back license entitlements as well as signing the server response, and use that to control the state of your application.