Unique computer ID hardware based in Java

青春壹個敷衍的年華 提交于 2019-12-17 19:38:10

问题


I need to generate a unique code from a single PC, my software will be distribute by licence, and locally I need to identify the environment and send this code to the server. I don't want to mantain on the server a sequencial number and each client recieve a number of the sequence, i tried to read the MAC adress from NetworkInterfaces, but is not secure, the user can change easily the MAC adress. The best way I think if its possible to read the motherboard serial number, but I haven't found the way until now. Any sugestion?


回答1:


How much is your software worth ?

Does the target market pirate software a lot ?

Motherboard serial number reading is possible on Windows boxes using WMI

Use WMI to read serial number http://www.c-sharpcorner.com/UploadFile/GemingLeader/mb-sn-wmi08242009101325AM/mb-sn-wmi.aspx

Use WMI from Java http://henryranch.net/software/jwmi-query-windows-wmi-from-java/

WMI is/was a broken on Windows XP domain members on a AD Domain, if they use group policies.

( This only effects most corporate users of XP, so not a big deal)

Hope this helps a bit ( MAC address is simpler... but is easy to change)




回答2:


The MAC address is not reliable. You should aim for something that cannot be change such a CPU ID or HDD IDE ID. Here is want I mean: http://www.soft.tahionic.com/download-hdd_id/index.html

Unfortunately I don't think that DLL is working with Java, but at least it will show you some info about what is reliable and what is not.



来源:https://stackoverflow.com/questions/3597237/unique-computer-id-hardware-based-in-java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!