Solved

the absolute unique number of each pc ? how to get it in d3

Posted on 1998-08-25
14
305 Views
Last Modified: 2010-04-04
I need.. a ABSOLUTE unique number (like the processor serialn. or motherboards n. or or or)
it's to generate a key-file for my app.. so some samples are welcome to :)

skatan
0
Comment
Question by:skatan187
  • 3
  • 3
  • 2
  • +5
14 Comments
 
LVL 8

Expert Comment

by:ZifNab
ID: 1337719
what about combining all these togheter to one key?
0
 
LVL 4

Expert Comment

by:erajoj
ID: 1337720
Combining them all is a good solution.
Include the MAC-address also (if there is one)?

/// John
0
 
LVL 6

Expert Comment

by:Stuart_Johnson
ID: 1337721
Hi Skatan,

We have been working on this problem for around nine months now.  Unfortunately, appart from the network cards' address, there is no way of getting a completely unique number for every PC.  And, the addres of a network card can only be retrieved from cards which support it.  To date, I have not been able to get it to work on very many cards at all except for genuine NE2000 cards (from Novel).

The best that we have been able to come up with is the hard disk serial number, combined with the Windows OEM number, Date and Time of Installation, Name and Company name and physical drive attributes.  We use all of these factors and then use a random seed to generate a unique ID number.

Problem with this is, if someone uses hard disk copying program which does the drive sector by sector, you will end up getting fairly similar numbers.

My suggestion to you would be to use what we have done above.  If you are interested, I can send you some code to get going with, but obviously I can not send you everything we are using.  I have the code to return the NICs' address, and I can forward that onto you as well.

The main problem with retrieving all that stuff you where after is this.  Using a protected mode operating system, you have to do "Thunking" to retrieve that info (because it resides in protected memory areas).  I dont know too much about this, so I wont go into it.  All I know is what I have been told, and its DAMN hard.

Good luck, and let me know if you want some of our code.

Stuart.
0
 
LVL 1

Expert Comment

by:AJFleming
ID: 1337722
Stuart,

it sounds like you're doing something very similar to something I tried to do a while back. I couldn't make it work though... (that wonderful thunking problem you were talking about) I know it's  a bit cheeky, but I'd be really grateful if you could mail me any code which you don't mind sharing, or point me at a resource covering this sort of thing.

Incidentally, I know there is a way of getting the MAC address out of non NE2000 cards - although I don't know how you do it... It  has been done though; Quake will give you the MAC address in it's network game setup screen. I'll dig around and see what I can find...

Cheers,

Adam.

Email : ajf4@aber.ac.uk
0
 
LVL 1

Expert Comment

by:BlackDeath
ID: 1337723
satan:

95 AND nt?

Death.


0
 
LVL 1

Author Comment

by:skatan187
ID: 1337724
the component I have right now is not coded by me..
but it finds the serial number of the motherboard..

A problem I have with the hard-disk serial is that when a user changes
the drive wich contains the used number.. the program will have to be
reregistered.. and since hard-drives are more often changed then
processors or motherboard numbers... However,, I am also looking for
a working sample to make somekinda serial number protection with
this key : I tried encryption of the string-combined with the name
of the users .. and use this as the 3 veriables for checking the
registration..

why do I need this: the most users of my program have serial number
lists and know what warez are :) .. to avoid that the app will be listed in
these lists, I wan't to combine this unique number with the name of the user
and make a key with these values .. If somebody knows another solution then
using this unique number .. like for example the windows registery : the
problem here is that cracks will be made ! (my app: a menu for cd's ..
yea : also warez cd's ! so most users will use the crack if it's availeble)

0
 
LVL 6

Expert Comment

by:Stuart_Johnson
ID: 1337725
Adam: I'll post you off some stuff today.  Parts are in C, others are in Delphi.

Skatan187: Any chance of getting a look at that component at all?  Does it have the source code at all, if so, we maybe on track to being able to get some other info!

Stu.
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Expert Comment

by:chrismo
ID: 1337726
Why not generate a GUID? I know there's debate over whether these are truly unique - but will it do for your purposes?
0
 
LVL 1

Author Comment

by:skatan187
ID: 1337727
I rejected your answer because there is not eneuf information explaining how ..

0
 

Accepted Solution

by:
chrismo earned 40 total points
ID: 1337728
Sorry 'bout that.

A GUID is a Globally Unique ID. The algorithm for generating it was created by Microsoft I believe. Some math heads claim it's not absolutely reliable for a truly globally unique ID - but for practical uses it works very well.

GUIDs are used with COM objects. Every COM object must have a GUID to identify itself and register's itself on your machine in your registry with its GUID. This should allow multiple COM objects to be installed on your machine and guarantee there won't be an ID conflict.

To programmatically generate a GUID in D3 - use the following API call:

CoCreateGUID (check the Win32.hlp file for specifics). This call exists in the OLE2.pas file in the RTL\WIN Delphi source directory.

Delphi provides a TGUID record for working with the value as well as GUIDToString and StringToGUID functions for ease of use. You will most likely have to store the GUID as a string in your table (perhaps not an option for you).

What database platform are you using? If you're using MS SQL Server - it has a timestamp data type which is a unique value as well - though it's a bit awkward to work with.

If you'd like more information on the contents of a GUID, check out the following:

http://x4.dejanews.com/getdoc.xp?AN=383578705&search=thread&threaded=1&CONTEXT=904565495.563150969&HIT_CONTEXT=904565436.495845509&HIT_NUM=7&hitnum=6

http://x4.dejanews.com/getdoc.xp?AN=383484286&search=thread&threaded=1&CONTEXT=904565495.563150969&HIT_CONTEXT=904565436.495845509&HIT_NUM=7&hitnum=5
0
 
LVL 1

Author Comment

by:skatan187
ID: 1337729
I'll accept this anwer.. but it still not exactly what I was looking for:
I am looking for a number wich is stored somewhere is the hardware of the
user.. so that he can only use the software on HIS computer .

(like: perhaps a serial of the CPU, mother-mainboard, hardisk dunno.. )
I also prefer hardware that is a part of the basics of the pc: like
the mainboard, C-drive, CPU ...

skatan
0
 

Expert Comment

by:chrismo
ID: 1337730
If you look up the DejaNews links I provided - some of the GUID data is read from the machine, combined with some timestamping algorithmic stuff...

But you are correct - if you simply want a single number per machine - a GUID is not really it. Thanks for the points, however! Hope it works out for you...
0
 
LVL 1

Expert Comment

by:BlackDeath
ID: 1337731
hoi, chrismo -

are these those which are to be found in the HKEY_CLASSES_ROOT\CLSID -Key structure?

Black Death.
0
 
LVL 3

Expert Comment

by:vikiing
ID: 2119553
I know this is a dead question, but perhaps my comments serv to someone.

Like several guys of you, I've also worked during almost one year to get a unique machine ID number.

What I've finally discovered is a "machine's fingerprint" derived from several parts of machine itself:
1- BIOS's creation date
2- Machine's processor type, model and manufacturer
3- Creation date & time of directory where system is stored
4- Disk geometry (cyls/sectors/heads)
5- Info stored at non-reachable regions of disk

Of course, if user buys a new machine, he must call to re-register, but that's the only way I've found to obtain a secure protection scheme.

The registering program remains at user's machine; this program is used each time user needs to install the system in another machine (or if he has changed, let's say, the disk, or the motherboard). It uses single-use telephone passwords which disables user to re-register each time he want, because the right passwords to open registering process must be supplied when user is in front of the screen and after giving me some "control numbers" displayed at initial screen, numbers that change on each program execution.

I've installed more than 400 copies of a system developed by me, and all of them run under this scheme. Of course, from time to time, I receive a call from someone which has upgraded the machine, perhaps buying a faster processor (of course, with another mobo), or a higher-capacity disk. The process to call me to re-install the system lasts no more than 3 minutes. And I can sleep very quietly knowing that my system is secure.

Unfortunately, all of this require non-protected mode accesses, which make my system be yet a DOS application. I'll see what will occur when I migrate to Windoze... :~(
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now