How to get a unique computer identifier?

I am writing a game server in Java, and I need a way to get a unique identifier for a computer (protection of multiple accounts), the target platform is Windows> = XP. I tested many ways to do this with pure Java and JNI:

  • MAC address - very easy to change, high chance of collision.
  • (JNI) SN motherboard is not always a high probability of a collision.
  • (JNI) Diskdrive SN - Cannot find a drive with a drive letter with WMI, there is little chance of a conflict, it does not work in Windows XP (does not have a SerialNumber field)
  • File in a hidden folder - does not save after reinstalling Windows, can modify or delete if I know where it is.
  • (JNI) Windows GUID - High chance of a collision that does not persist after reinstalling Windows.

Any other way?

+6
source share
2 answers

I can suggest you use CPUID, I used it for my software licensing

Greetings :)

+2
source

There really is no way to get a unique computer identifier. Many programmers apply different logic and different things, but any logic or system is not a complete proof. Thus, you must create logic that cannot easily be easily broken by other programmers. As you try to create a Game Server, and therefore you need to try different logic and the best unique thing I found:

  • You may have a user IP

  • User MAC address

  • User Email

  • Custom Hard Disk Serial Number

  • User motherboard name and number

You need to create a combination with some hash in order to mix, so the key remains unique for each computer.

0
source

Source: https://habr.com/ru/post/950950/


All Articles