I was wondering if someone could tell me how I can determine the System ID programmatically? I am contemplating adding some form of copy protection to an installer I am writing using an algorithm based on the ID. I am well aware how easily these schemes are defeated however I am approaching this partially as an academic exercise plus wanted to add some sort of deterent for the casual non-authorised distributor of my software(!).
Any help or suggestions much appreciated.
Cheers,
Andrew
Any help or suggestions much appreciated.
Cheers,
Andrew
Well, the CPU serial number is unreliable, it can be disabled or just not present so that is pretty much a pointless effort. A unique ID can be derived from the Windows registration key and the volume serial number. But the volume serial number is subject to change (requiring a new unlock code) and we all know that the Windows registration key is pretty much useless. I think it would be difficult to extract a unique system ID that would be reliable across a wide range of processors and systems, you would probably be better off devising some other registration system than wasting any time on a scheme that can be easily broken and would be a headache to write.
I know some software that uses the computers MAC address. I know it can
be determined in software, because I have seen programs give me it. I dont
know how they do it though.
Or is the MAC address and CPU serial number the same thing?
be determined in software, because I have seen programs give me it. I dont
know how they do it though.
Or is the MAC address and CPU serial number the same thing?
To obtain network card's MAC address, use GetAdaptersInfo API.
A MAC address can be changed by a user.
not always, and its hard
The MAC address has an unstated assumption of a computer system that is networked. Beside NIC cards can be exchanged for new ones just like any other unique hardware key situation.
Regards, P1 :cool:
Regards, P1 :cool:
As others have mentioned, it is hard to generate a unique ID.
Along with the ideas already presented, one form I did for a company was to get various ID (like HDD, BIOS vers, GUID) and generate a ID from all of that. That pretty much made it unique but if a hardware was changed, it made it invalid.
Relvinian
Along with the ideas already presented, one form I did for a company was to get various ID (like HDD, BIOS vers, GUID) and generate a ID from all of that. That pretty much made it unique but if a hardware was changed, it made it invalid.
Relvinian
sometimes a MAC can changed very easily, on my system I can change it in the device manager by default.
I'm not really sure how effective it would be, but why not just grab the value of HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionProductId and encrypt it using a simple substitution cipher. That's not a value in the registry people are likely to mess with, and for the most part (unless on a pirated copy) the ID will be fairly Unique.
Also, from a uniqueness pov, for amusement purposes you might want to check out http://lamezoid.port5.com/code/random_crypt.txt and try compiling it with different compilers on different OS's. Due to how each compiler handles rand() differently, to get the "decoded text" you have to compile this with DJGPP on Windows98, otherwise you get garbage text. A friend of mine wrote this in C, so it's not really that relevant, but I found it interesting none the less as far as getting unique results dependant on the system.
Regards,
Bryant Keller (aka Synfire)
Also, from a uniqueness pov, for amusement purposes you might want to check out http://lamezoid.port5.com/code/random_crypt.txt and try compiling it with different compilers on different OS's. Due to how each compiler handles rand() differently, to get the "decoded text" you have to compile this with DJGPP on Windows98, otherwise you get garbage text. A friend of mine wrote this in C, so it's not really that relevant, but I found it interesting none the less as far as getting unique results dependant on the system.
Regards,
Bryant Keller (aka Synfire)