Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I always post dificult threads... I know...

Lets see if you guys can help with this...

 

 

I need to know, within my .net app, the serial number of the CPU.

Is it possible?

 

If easyer, it can be the serial of the motherboard instead...:D

 

 

 

 

Thanx...

 

 

Alex

Software bugs are impossible to detect by anybody except the end user.
Posted

Do you absolutely need the serial number? Although you didn't say, usually issues like these are for product legitimacy and for product keys for shareware programs. If that is the case...I know that Window's assigns a handle to devices so that you may generate, unique data for a program is installed on a computer.

Since no one has replied i figured i'd take a stab.

 

brandon

i'm not lazy i'm just resting before i get tired.
Posted

That's exactly it...

 

Could you give me a hint or a sample code?

 

 

 

Thank you very much...

 

 

 

Alex

Software bugs are impossible to detect by anybody except the end user.
Posted

Well like i said I don't know how to do that but i have seen the same quetion asked before. I would start a new post and restate your question in more detail. Give this one a day or two to see if anyone catches it first though.

Do some searching on handles too while you wait... sometimes we get so use to these forums we forget to do that.

 

Glad I could help

brandon

i'm not lazy i'm just resting before i get tired.
Posted (edited)

Complete Sys Info ( CPU serial included :D ):

 


using System;
using System.Management;
...
...
...
private void frmMain_Load(object sender, System.EventArgs e)
{
string[] cimClass = {"Win32_LogicalDisk", "Win32_Processor", "Win32_OperatingSystem"};
    foreach(string cc in cimClass)
   {
      Console.WriteLine("----------- {0} --------------", cc);

ManagementClass cimobject = new ManagementClass(cc);
ManagementObjectCollection moc = cimobject.GetInstances();

    foreach(ManagementObject mo in moc)
foreach(PropertyData s in mo.Properties)
{
   try 
  {
Console.WriteLine(s.Name + ":\t\t" + mo[s.Name].ToString());
                }
catch(System.NullReferenceException)
{
Console.WriteLine("No object reference for: " + s.Name);
continue;
}
}
}
	
}//end frmMAinLoad

 

works only on winMe,WinXP,W2K!!!

for win98 and NT4 WMI core MUST be installed

 

:D

Edited by sizer
Some people are wise and some are other-wise.
Posted

(These should be posted in General)

 

ok i created that project to see what it looks like and it sure enough works...

So now i'm curious as too how this system works for creating a Key for unlocking a program.

I can see generating a key based on certain factors but which ones?

Once you have that it would seem like a good idea to keep people from installing multiple times from the same disk without consent (giving to friends etc...)

Do all disks have different volume labels?

If so that would seem like a good way to prevent furthur stealing.

ie. Sending encrypted volume label of disk, with a made from key hardware information to identify the computer. The only issue after that is to prevent burning copies... How is that done?

Of course crackers and hackers and such will figure something out but i'd like to know how to accomplish these things anyway.

Possibly install a hidden bs file somewhere that is absolutely necessary to install but serves no purpose to program? The registry?

 

Sorry this post just put me on a theoretical splurge. I'd like to have some classes designed to accomplish these things...but it might be fun doing it myself.

 

brandon

i'm not lazy i'm just resting before i get tired.
Posted

Since this works, and I sincirelly thank 'sizer' for that my method of using this will be very simple, it won't be practical but will fill my need and... simple...

 

The software I'm developing and wish to secure with this method will be only installed by me on by my partners, no client will be allowed to have a software disk before I have the machine CPU serial number. Second thing, the licencing of the program will be per machine so I use the more reliable part of a computer... the CPU and its unique serial number!

 

After I have this, I compile a security dll for that specific client/computer. that software can me installed on another computer but will not run unless it have the CPU it is expecting...

 

 

This is my current method...

If we debate this it possibly can be improved.

 

 

Tell me what u think!

 

 

 

 

Thanks.

 

Alex :D

Software bugs are impossible to detect by anybody except the end user.
Posted

When I said "Method" I wasn' refering to code, I was refering to a psycologic way of doing this...

 

I don't have any code made around this...maybe next weekend I'll implement it, so it would be good if we share some security ideas! :D

 

 

 

Thanks

 

 

Alex :D

Software bugs are impossible to detect by anybody except the end user.
  • Leaders
Posted

if you just want your processor id , you can do this...

       Dim manClass As New ManagementClass("Win32_Processor")
       Dim mObjCol As ManagementObjectCollection = manClass.GetInstances
       Dim m As ManagementObject
       Dim processorID As String = ""
       For Each m In mObjCol
           If processorID = "" Then
               processorID = m.Properties("ProcessorId").Value
               MessageBox.Show(processorID)
           End If
       Next

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...