Getting the System Hardware Fingerprint (XP/2003/Vista)

Share your advanced PureBasic knowledge/code with the community.
DaylightDreamer
User
User
Posts: 52
Joined: Wed Feb 04, 2009 8:11 am
Location: Armenia

Post by DaylightDreamer »

Any idea exactly which hardware fingerprint is this ?
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Post by Kwai chang caine »

Thanks GNOZAL with your code on W2000
Profil 1 -> {24a7b7c0-4c22-11d8-a3d5-806d6172696f}
{24a7b7c0-4c22-11d8-a3d5-806d6172696f}
But the two codes of CITYSTATE don't works :cry:
1/ One have error memory
2/ Two nothing return
ImageThe happiness is a road...
Not a destination
Esteban1
User
User
Posts: 37
Joined: Sat Jul 16, 2005 4:39 pm
Location: Uruguay

Post by Esteban1 »

DaylightDreamer wrote:Any idea exactly which hardware fingerprint is this ?
Well, this doesn't seem to be a real hardware fingerprint but the current hardware profile identifier. So, if you change your hardware profile (just by adding a new one via "Properties" of "My PC"), you'll be getting something different even if you are still having the same hardware.

(Sorry for my English).
DaylightDreamer
User
User
Posts: 52
Joined: Wed Feb 04, 2009 8:11 am
Location: Armenia

Post by DaylightDreamer »

But wil it change if i move my hard disk with windows to another PC ?
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Post by SFSxOI »

I tend to think that the code in this thread is not generating an actual hardware hash for some reason like it should. The MSDN at > http://msdn.microsoft.com/en-us/library/ms724311.aspx says this:

"The system generates a GUID for each hardware profile and stores it as a string in the registry."

I tried it, the registry GUID entry should be the same as what this generates, but it isn't all the time. The GUID and hash (as its being called here) are one in the same thing, but the one in the registry doesn't match the one generated by this code for some reason sometimes.
DaylightDreamer
User
User
Posts: 52
Joined: Wed Feb 04, 2009 8:11 am
Location: Armenia

Post by DaylightDreamer »

:(
Is it posible to get motherboard`s serial number then ?
Thalius
Enthusiast
Enthusiast
Posts: 711
Joined: Thu Jul 17, 2003 4:15 pm
Contact:

Post by Thalius »

over the mainboard vendors API dlls prolly yes.
"In 3D there is never enough Time to do Things right,
but there's always enough Time to make them *look* right."
"psssst! i steal signatures... don't tell anyone! ;)"
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

Equivalent to Gnozal code for those who prefer not to use reference pointers and PeekS; and so then use string variables directly:

Code: Select all

;
; Get Hardware Fingerprint
;
#HW_PROFILE_GUIDLEN=$27
#MAX_PROFILE_LEN=$50

Structure HW_PROFILE_INFO
  DockInfo.l
  szHWProfileGUID${#HW_PROFILE_GUIDLEN}
  szHwProfileName${#MAX_PROFILE_LEN}
EndStructure
Procedure$ HardwareFingerprint()
  Protected hwp.HW_PROFILE_INFO
  GetCurrentHwProfile_(@hwp)
  Debug hwp\szHwProfileName$+" -> "+hwp\szHWProfileGUID$
  ProcedureReturn hwp\szHWProfileGUID$
EndProcedure

Debug HardwareFingerprint()
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Post by SFSxOI »

DaylightDreamer wrote::(
Is it posible to get motherboard`s serial number then ?
Yes, you can use WMI to get the motherboard serial. I use srod's COmate package to use WMI, you can then use it to get a ton of information about the computer.
User avatar
doctorized
Addict
Addict
Posts: 882
Joined: Fri Mar 27, 2009 9:41 am
Location: Athens, Greece

Post by doctorized »

None of the codes posted here return data to me.
For example, Psychophanta's code returns "Profile 1 ->" only.
Nothing in the form: {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} appears.
( I use PB 4.31)
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Re:

Post by SFSxOI »

doctorized wrote:None of the codes posted here return data to me.
For example, Psychophanta's code returns "Profile 1 ->" only.
Nothing in the form: {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} appears.
( I use PB 4.31)
are you running it with admin privilages? Your not running it on Windows 7 are you?
The advantage of a 64 bit operating system over a 32 bit operating system comes down to only being twice the headache.
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Re: Re:

Post by rsts »

SFSxOI wrote:
are you running it with admin privilages? Your not running it on Windows 7 are you?
Seems to work fine on Win 7 here :)

cheers
User avatar
doctorized
Addict
Addict
Posts: 882
Joined: Fri Mar 27, 2009 9:41 am
Location: Athens, Greece

Post by doctorized »

SFSxOI wrote:are you running it with admin privilages? Your not running it on Windows 7 are you?
I use Windows XP x64 SP2 with admin privilages. Neither PB 4.31 x86, nor x64, return the code.
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4322
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Re: Getting the System Hardware Fingerprint (XP/2003/Vista)

Post by Rook Zimbabwe »

What I find interesting is that on all XP machines so far the end of the strings reported look like "806d6172696f" which MUST be the OS and the section right before that MIGHT be the CPU type (I am only guessing here!) 8)
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Re: Getting the System Hardware Fingerprint (XP/2003/Vista)

Post by SFSxOI »

hmmm...nope. This is only a hardware profile GUID thats intended for use with saving user settings as it relates to the hardware profile power status of 'docked' or 'undocked'. All windows OS's have such a profile, its not actually a hardware hash or GUID after all in the sense that its unique to a particular computer and that computer only and none other would have (or is likely to have) the same hash. Although it may seem different between computers belonging to different people it can be duplicated. For example, I have seven computers set up on my home network and all of them are exactly the same for hardware-memory-OS (Vitsa Ultimate on 6 - Windows 7 on one) - drives - motherboard - processors - etc....(mass hardware buy, built them all at the same time), all of the Vista machines show the same output from running this, the produced hash is exactly the same for each of the computers. So its not unique to each individual computer and not actually a unique hardware fingerprint.
The advantage of a 64 bit operating system over a 32 bit operating system comes down to only being twice the headache.
Post Reply