• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 512
  • Last Modified:

Processor Serial Number

How can catch the manufacture serial number built in the microprocessor?
I want a complete code in C or C++.  
If I accept an answer I’ll rise the points.
0
newbuilder
Asked:
newbuilder
  • 6
  • 6
  • 3
  • +3
1 Solution
 
nietodCommented:
This of course depends on the processor we are talking about.  What processor?

I have to warn you that no processor that I know of (in particular non of the x86 family or the 68xxxx family have a the serial number "built in" to the processor. In fact it is extremely unlikely that ANY processor does.  The serial number is just stamped on the back.

The intel processors have a CPUID instruction, that returns information about the procssor that includes its stepping, but it is not an ID, there are literally millions of processors with the same stepping.
0
 
DarrinECommented:
Nietod is right - there is no serial number for the CPU - but so we can maybe help a little more - what did you want to the serial number for ? Unique identification ? Use the HDD Serial # or the MAC address - post a seperate question to get the complete answer
0
 
newbuilderAuthor Commented:
nietod and drrinE
Mainly I want a unique number, can be handle form Microprocessor, CPUID or any one.
This is very good in Building the copyrights of the systems. When you make an application and it must execute in one machine (By name), your code can handle the CPUID and then execute.
I have no enough experiments in assembly language, give me complete code, executed successfully and take the points.  
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
newbuilderAuthor Commented:
To nietod and drrinE

No need the processor exactly, but a unique number form the PC,
I’m sorry, I was not meant the CPUID, because it is not a unique.  
Sorry again.
0
 
DarrinECommented:
give Neitod the points because he has answered your question - post a sperate question with exactly what you need

DarrinE
0
 
nietodCommented:
200 points is a lot to spend on a useless, though correct, answer.  I'll withdraw my answer if DarreE wants to suggest a way of getting another unique ID.
0
 
RONSLOWCommented:
MS do this when generating GUID (globbally unique identifiers).

According to the docs on it includes

"The truly globally unique IEEE machine identifier, obtained from a network card (the implementation does not require a network card; if no network card is present, a machine identifier can be synthesized from highly variable machine states and stored persistently)
"

maybe this would help you?
0
 
nietodCommented:
That is what DarrenE is proposing.
0
 
pellepCommented:
The Pentium III processors actually DO have a unique serial number, but not their predecessors. I recall a rather huge debate when rumors indicated that the new versions of MS office might include 'hidden' functions that stamped word-documents, outlook emails etc with this number. I recently downloaded a small utility from Intel which extracted the serial number from PIII processors. Access to this serial number can be switched on/off by software means. I suggest looking at Intels website for a utility called
'Intel Processor Serial Number utility'. However, it only works with Intel PIII processors.

Another approach would be to tie your software to the MAC-address of your network-card. It would not be unique to a computer, but to a network card. That address is guaranteed to be unique.
0
 
RONSLOWCommented:
OK .. didn't relise the MAC address was the name for the unique id of the network card.

Perhaps you can try getting a GUID and using (part of) that.  Part of the GUID comes from the unique machine id, and part from the current date/time.  You may need to reverse engineer the GUID content unless you can find some info on it (I'm pretty sure there was some docs around a long time ago on the GUID internal format .. not sure).
0
 
nietodCommented:
I'd like to know what happened to newbuilder and DarrinE.  You there guys?
0
 
newbuilderAuthor Commented:
I'm listening.
But I want a code  
0
 
DarrinECommented:
In this situation - what is wrong with the HDD # ?? Its unique and very useable
0
 
DarrinECommented:
BTW - sorry for the delay but I was on Holidays <s> for a week !!!!
0
 
nietodCommented:
How do you get the HDD #.  (Note that the volume serial number is available, but not really good for this.)
0
 
DarrinECommented:
I dont use the serial # for the HDD - but I'll look for the code anyway - I use the volume serial number as you've identified.

What I think this fella (or girl) really wants to try to complete is a security system to prevent his software from being copied - if I am right the the HDD "Volume serial" # is OK - I have been using it now successfully for several years (about 4 or 5) with little if no requests for "new" licenses based upon that number.

I can post the code but its "huge" - I would prefer that I make the code into a DLL and email it to everyone that wants it - there is really nothing special in it because the encryption used in it is proprietory and simply cant be hacked without some sort of extra ordinary effort - deleting a license file or the associated bits in the registry locks the program and renders it useless after 30days.

If anyone is interested I would enviseage having the code ready in about 30days - work permitting - points will be a key factor in how much is given away <s>

Otherwise I can walk you though the steps and simply give you the encryption code

Nietod - send me a private email on this subject for some more info (dwe@primus.com.au)
0
 
nietodCommented:
The problem with the volume serial number is that the user has the ability to change it.  That would not be adequate for copy prevention security since the user could simply change the serial number of the machine running the copy so it matches the original.

Why is the code huge?  The volume number is available with GetVolumeInformation().
0
 
DarrinECommented:
The code that encrypts the information and then makes the license file.

How do you change the serial number ? I've never heard of that before
0
 
pellepCommented:
The CPUID mentioned earlier will for PIII pocessors contain, in addition to the normal processor information, the unique serial number of the processor (see my earlier comment).
0
 
Toad224Commented:
I believe the only processor which it is possible to do that on is Intel's Pentium III.  All other processors it is not possible to retrieve the serial number.  Secondly, the default for the P III serial number is off.  It will need to be turned on in the BIOS before it is accessable to software.
0
 
RONSLOWCommented:
Here is code that should do what you want (by the prolific P.J.Naughter)

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?lngWId=3&txtCodeId=174

>>>
A freeware dll to provide the basis for network copy registration PJSECURE is a simple C style dll which can be used as the basis for a network copy registration for your products. The program is freeware, meaning you are free to use it in anyway you like so long as you do not redistribute the source code with your product. The functions in pjsecure retrieves 2 pieces of information which can be used to uniquely identify a computer. The first function retrieves the NIC address of an installed network card. This 12 digit number is guaranteed unique by network card manufacturers. The second function returns the serial number associated with the "C" drive on your computer. With these 2 values you can build your own registration mechanisms on top. The enclosed zip file contains the PJSECURE source code (as a VC 5 workspace) and a simple console based application which exercises the dll.

PJ Naughter at http://indigo.ie/~pjn/index.html 
>>>

download from
http://www.planet-source-code.com/upload/ftp/CODE_UPLOAD1614.zip

Hope this helps !!

0

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 6
  • 6
  • 3
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now