4

Ok, I know that no licensing scheme is uncrackable; I'm not asking for one. I've already got a method in Java that will combine that hosts MAC Address, CPU Type, and Hard Drive serial on both Windows and Mac OSx to compute a 'hardware fingerprint'. However, I've recently purchased a MacBook Pro and have stumbled accross the Hardware UUID in the System Profiler and am just wondering whether it is worth using this code on Macs instead of the one that my method generates, or if it is not advisable, because I'm not sure if it has always been available etc.?

If you do suggest I use it, I'd appreciate if you could also tell me how to access it using Java. Also, does windows have a similar UUID that I could use?

Thanks in advance

Andy
  • 3,600
  • 12
  • 53
  • 84
  • Hi Andy, I have been literally breaking my head to generate a hardware based fingerprint which works both on Windows and Mac. Generating it based on the MAC Address is a bit too risky as the Mac address could change and that would invalidate the license. Could you please help me by educating as to how you happen to have the CPU Type and Hard Drive serial number working on Windows and Mac both - I know there are JNI libraries that can be used, but they are not cross platform and won't work on Mac. I'd really appreciate the help. – Rohan Dec 13 '12 at 15:27
  • @Rohan I know! It is a really hard thing to do and is extremely easy to see why this could be a billion pound industry in itself. Sorry for the slow reply by the way, I will try and get some help to you by tomorrow or the earliest I can, because I have to go now. But just of interest, how could the MAC address change because as far as I'm aware the only way this could happen is through hardware change or deliberate hacking, and I am not willing to account for hackers personally. – Andy Dec 18 '12 at 21:05
  • @Rohan I've just had a look at all this again because I haven't thought about in a while! Indeed, the MAC address can actually be changed quite easily, but it does not change by itself so combined with the hard drive serial number and CPU type I think that is a safe option. The truth is there will never be a true, programming, solution to piracy and you will actually end up in tears if you try to cover all eventualities. What's more, I don't expect the type of people my software is aimed at to want to, or even know how to, change their MAC address! – Andy Dec 19 '12 at 15:50
  • @Rohan As for the CPU Type, I simply use `System.getProperty("os.arch")`. Now I know that this method isn't the best, most of the time it just returns "x86", but I feel that it just adds that extra bit of obscurity and it doesn't really make a difference if it's there or not. As for the HDD serial number, first I get the operating system using `System.getProperty("os.name")` which then allows me to determine which method I need to use to obtain the data. For windows, there is a piece of code that is easily found with a quick Google search, that uses a temporary VBS script – Andy Dec 19 '12 at 15:58
  • @Rohan However for Mac, it is a bit more complicated; you need to use two commands. The first line is `df -h` and this will return the primary volume's name/the volume that the operating system is on. With that name, you can use `diskutil info ` (where `` is the one you just obtained) to find the 'Volume UUID'. I recommend you do this manually first so you can see how the data is outputted, and thus how to collect it! Hopefully you are ok with the actually coding of this in Java. Hope that helps – Andy Dec 19 '12 at 16:05
  • Bear in mind that there could be more than one MAC address, e.g., one for Wifi and one for Ethernet. – JWWalker Jan 08 '13 at 02:25
  • I'm voting to close this question as off-topic because it is about licensing or legal issues, not programming or software development. – Shankar Narayana Damodaran Jun 18 '15 at 03:14

1 Answers1

1

I would guess that this is not a good idea. Apple has deprecated developer access to the UUID in iOS 5, and it would not surprise me to see this carry through to OSX as well.

See this thread for discussion: UIDevice uniqueIdentifier Deprecated - What To Do Now?

Community
  • 1
  • 1
Jeremy Brooks
  • 589
  • 3
  • 12
  • Oh, as you probably guessed - I hadn't seen that. That's a shame - no operating system makes it easy to implement copy protection - but I thought for a moment Mac had! Oh well, I guess I'll keep using the method that I have now unless anybody knows of a better one... – Andy Apr 24 '12 at 16:35