PDA

View Full Version : Hardware ID


flynch01
04-24-2007, 07:25 PM
How can i create a Hardware ID from the CPU? Using C++

flynch01
04-25-2007, 06:16 PM
Bumpz0r

oracleguy
04-25-2007, 07:41 PM
Like so the program checks for this ID and only runs on that computer?

flynch01
05-17-2007, 09:58 PM
yes exactly

oracleguy
05-17-2007, 11:12 PM
Is this on Windows or *nix?

Also what happens if the user upgrades their CPU? The program won't work anymore if you key it to the CPU specifically.

flynch01
05-17-2007, 11:46 PM
Im going to have constant contact with the users so its not a problem. However i thought about doing this.

In the console typing VOL gives me a serial, also if maybe i could find out the ram size and cpu speed, then make a hash out of it i could use that. Unless you have a better way would you help me do this in C++?

And its windows.

oracleguy
05-18-2007, 01:14 AM
You can get a bunch of fun stuff about the computer by using the GetSystemMetrics and GetSystemInfo methods in C++ under Windows.

flynch01
05-18-2007, 11:13 AM
Oh cool, I'll search that up on google then :) thanks

flynch01
05-18-2007, 11:24 AM
I must be stupid, but quick question.

I have all my data that I want.

char beforeHashx;

now I want to put them all into that. How do i make one long thing of all my data in that char thing?

flynch01
05-18-2007, 06:42 PM
So yeah, the get window stuff gave me the same code on like every computer :S

So I found another way. typing VOL C: in CMD promp gives me a unique code. Could you help me parse it from the output into a variable? Heres what I've done, simple as anything:

#include <iostream>
using namespace std;

int main()
{
system("VOL C:");
}

Gives me my Serial. How can I get it out?

oracleguy
05-19-2007, 12:41 AM
I must be stupid, but quick question.

I have all my data that I want.

char beforeHashx;

now I want to put them all into that. How do i make one long thing of all my data in that char thing?

A char can only hold one character, if you want a string of characters you have to use a character array or you can use the STL string class.

oracleguy
05-19-2007, 12:42 AM
So yeah, the get window stuff gave me the same code on like every computer :S

Well what information were you looking at?

flynch01
05-19-2007, 02:04 AM
All of them were the same rofl. But no worries I found a way now.

oracleguy
05-19-2007, 05:42 PM
All of them were the same rofl.

Riiight....

But no worries I found a way now.

Alright, at least you found what you wanted.