Possible Duplicate:
WIN32_Processor::Is ProcessorId Unique for all computers
I'm creating an application with a trial feature. To detect if a certain user already used a trial the application connects to my server with their machineHash
.
The machineHash
function look like this:
string cpuInfo = string.Empty;
ManagementClass mc = new ManagementClass("win32_processor");
ManagementObjectCollection moc = mc.GetInstances();
foreach (ManagementObject mo in moc)
{
if (cpuInfo == "")
{
//Get only the first CPU's ID
cpuInfo = mo.Properties["processorID"].Value.ToString();
break;
}
}
return cpuInfo;
However, it does report my processor ID as BFEBFBFF000206A7
(on two different Intel machines, i5 and a Celeron). Googling BFEBFBFF000206A7
has hits too, so it's not unique.
Could anyone tell me why this is not unique? I don't want to use the VolumeSerial of let's say the C:\
drive as that can be easily changed with a simple command.
Every processor manufactured will have a unique identifier called ATPO (serial number) that is unique to that processor only.
The ID of the processor is a hardware ID, so you cannot change it.
This returns the CPU's manufacturer ID string – a twelve-character ASCII string stored in EBX, EDX, ECX (in that order).
Instead of using the processor ID, combine multiple ID's of a system into 1 string to compare each time the program sends check.
Use something like this:
using System.Management;
ManagementObjectSearcher searcher = new ManagementObjectSearcher(
"select * from " + whatever_id);
All the values you can replace whatever_id with can be found here: http://www.codeproject.com/Articles/17973/How-To-Get-Hardware-Information-CPU-ID-MainBoard-I
I would find a few you want to use, some of which can be unique, but even if you dont use a unique field, you can make combinations that will, for most intents and purposes, be unique.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With