Support Forums
[C#] HWID Lock - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18)
+---- Forum: Visual Basic and the .NET Framework (https://www.supportforums.net/forumdisplay.php?fid=19)
+---- Thread: [C#] HWID Lock (/showthread.php?tid=7014)

Pages: 1 2


[C#] HWID Lock - xHtmlPhP - 05-13-2010

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


RE: [C#] HWID Lock - wchar_t - 05-15-2010

Thanks, It's Hard To Do Things Like This In C# .NET


RE: [C#] HWID Lock - Julie - 05-15-2010

Nice share, it's basic HWID protection but it work like a charm.
Thanks


RE: [C#] HWID Lock - //Pretext™ - 05-18-2010

Yeah this is pretty basic, might use this when i get my new computer as well.


RE: [C#] HWID Lock - robbiecee2 - 06-07-2010

wrong section ?


RE: [C#] HWID Lock - xHtmlPhP - 06-07-2010

(06-07-2010, 04:47 PM)robbiecee2 Wrote: wrong section ?

How is this the wrong section?


RE: [C#] HWID Lock - º¤øĐőŘđĘø¤º - 06-23-2010

thanks i really needed this!


RE: [C#] HWID Lock - saumil - 06-24-2010

thanks its use fulll


RE: [C#] HWID Lock - bgmur - 02-07-2011

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!


RE: [C#] HWID Lock - versx - 02-10-2011

Thank you for this, it helped me a bit.