Java:非基于 MAC 的唯一计算机 ID
到处找遍了,还是没有找到解决办法。我需要为产品密钥系统创建计算机的(半)唯一 ID。由于以下几个原因,它无法从 MAC 地址推导出来:
- MAC 地址是可变的
- 如果用户更改网卡,程序将停止工作
- 如果计算机没有网卡,则程序将无法工作
我更关心的是最后两个比第一个。
最好根据主板/CPU 的序列号来确定。独立于平台的解决方案固然很好,但特定于平台的解决方案也可以(只要有适用于 Windows/OSX/Linux 的解决方案)。
抱歉,如果之前已经介绍过,我只是找不到它。
Searched all over, but haven't been able to find a solution. I need to create a (semi) unique ID of a computer for a product key system. It can't be derived from the MAC address for several reasons:
- The MAC address is changeable
- Program stops working if user changes network card
- Won't work if computer has no network card
I'm more concerned about the last two than the first.
It would be best to base it on the serial number of the motherboard/CPU. A Platform independent solution would be great, but platform specific solutions are okay (as long as there are solutions for Windows/OSX/Linux).
Sorry if this has been covered before, I just couldn't find it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为有一些基于创建计算机“指纹”的解决方案。我所在的一个客户站点正在研究这一点,以此作为确保单点登录解决方案的用户身份的一种方式。最后,他们认为这太难了,也太容易出错,所以他们放弃了。
CPU id(我认为)可以在 BIOS 中禁用。因此,您需要找到可以访问的内容,这就是为什么大多数人似乎都会选择 MAC 地址。但正如你所说,它们可以改变。但几乎其他一切也可以。
您可能需要考虑的是某件事发生变化的频率是多少? MAC 可以更改,但多久更改一次?偶尔更换网卡后,使用新卡重新建立 ID 真的会伤害用户吗?
也许这可能有效,因为产品注册的一部分要求用户提供密码或短语。然后注册自己机器的MAC地址。如果他们更换了网卡,他们可以通过密码或短语与您联系,您可以使用新的 MAC 地址进行重置。它不会那么简单,但一般概念可能对您有用。
最后总体考虑一下您的产品。为了阻止未经授权的用户,值得做多少工作?拥抱这些用户并给他们注册的理由会更好吗?也许是您赠送的软件的精简版。或者在中央服务器上注册可以为您提供额外的数据和材料等。
有很多不同的商业模式围绕着传统的商业模式而发展,并且仍然可以赚钱。
I think there are some solutions around based on creating a "fingerprint" of the computer. One client site I was at was looking into this as a way of ensuring a users identity for a single sign on solution. In the end they decided it was too difficult and too easy for it to trip up so they gave up.
CPU ids (I think) can be disabled in the BIOS. So you need to find something you can access hence why most people seem to go for MAC addresses. But as you say, they can change. But so can just about everything else.
What you might need to think about is how often does something change? MACs can change but how often? for odd time that a network card is changed, is it really going to hurt the user to re-establish their id with the new card.
Perhaps this might work, as part of the product registration ask the user to give a pass code or phrase. Then register their machines MAC address. If they change the network card, they can contact you with the password or phrase and you can reset with the new MAC address. It won't be quite that simple, but the general concept might work for you.
Finally think about your product in general. How much work is it worth doing to stop unauthorised users? Would you be better off embracing those users and giving them a reason to sign up? Perhaps a light version of the software which you give away. Or registration on a central server gives you additional data and material, etc.
there are quite a few different business models floating around that side step the traditional one and still make money.