Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Same CPU ID on two Intel machines [duplicate]

Tags:

c#

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.

like image 788
Devator Avatar asked Dec 24 '12 17:12

Devator


People also ask

Do processors have a unique ID?

Every processor manufactured will have a unique identifier called ATPO (serial number) that is unique to that processor only.

Can CPU IDS change?

The ID of the processor is a hardware ID, so you cannot change it.

Where is Cpuid stored?

This returns the CPU's manufacturer ID string – a twelve-character ASCII string stored in EBX, EDX, ECX (in that order).


1 Answers

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.

like image 130
Titus P Avatar answered Oct 17 '22 22:10

Titus P