Support Forums

Full Version: [C#] HWID Lock
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
C# Hwid Lock, No encryption method or anything more, just checking the HWID.

Using;
Code:
using System;
using System.Management;
using System.Windows.Forms;

Project > Add Reference, Click the .NET Tab and find "System.Management" Click it then press ok, Now enter this code into Form1_Load (or what ever your form's named)

Code:
string cpuInfo = string.Empty;
            ManagementClass mc = new ManagementClass("win32_processor");
            ManagementObjectCollection moc = mc.GetInstances();
            foreach (ManagementObject mo in moc)
            {
                if (cpuInfo == "")
                {
                    cpuInfo = mo.Properties["processorID"].Value.ToString();
                    break;
                }
            }
            System.Net.WebClient Wc = new System.Net.WebClient();
            string hwid = Wc.DownloadString("http://www.YourSite.com/Hwid.txt");
            if (hwid.Contains(cpuInfo))
            {
            }
            else
            {
                MessageBox.Show("Your HWID Doesn't exist in our database");
                Environment.Exit(-1);
            }
            Wc.Dispose();

Victoire
Thanks, It's Hard To Do Things Like This In C# .NET
Nice share, it's basic HWID protection but it work like a charm.
Thanks
Yeah this is pretty basic, might use this when i get my new computer as well.
wrong section ?
(06-07-2010, 04:47 PM)robbiecee2 Wrote: [ -> ]wrong section ?

How is this the wrong section?
thanks i really needed this!
thanks its use fulll
Sorry to bump this but it really helped me out! I know it's not too advanced but it's exactly what I was looking for; thanks!
Thank you for this, it helped me a bit.
Pages: 1 2