Hello, Today i will be explaing how to make a HWID Generator And Basic Protection for your Programs!!!
now for The HWID Gen Open up VisualBasics2008
New...
Name the program whatever you like..
At the very top of the whole form add
now in the get hwid button add
this will get your HWID
now the copy button add
and the close button
Save it and build it, then run it to test it!
Now the following code you ADD into your program that you are going to protect! but for now while you are learning how to do it just add a textbox and 1 button
just delete all the code that you see and then add this
all of you will get errors but all you have to do is right click
Click Add Reference
then on the keyboard press "s" and look for system.management
and double click it and it shoudl work fine!
if you have any problems PM Me!!!
-DeHaterZ
now for The HWID Gen Open up VisualBasics2008
New...
Name the program whatever you like..
At the very top of the whole form add
Code:
Imports System.Management
now in the get hwid button add
Code:
Dim cpuInfo As String = String.Empty
Dim mc As New ManagementClass("win32_processor")
Dim moc As ManagementObjectCollection = mc.GetInstances()
For Each mo As ManagementObject In moc
If cpuInfo = "" Then
cpuInfo = mo.Properties("processorID").Value.ToString()
Exit For
End If
Next
TextBox1.Text = cpuInfo
this will get your HWID
now the copy button add
Code:
Clipboard.SetDataObject(TextBox1.Text, True)
and the close button
Code:
me.close
Save it and build it, then run it to test it!
Now the following code you ADD into your program that you are going to protect! but for now while you are learning how to do it just add a textbox and 1 button
just delete all the code that you see and then add this
Code:
Imports System.Net
Imports System.Management
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim cpuInfo As String = String.Empty
Dim mc As New ManagementClass("win32_processor")
Dim moc As ManagementObjectCollection = mc.GetInstances()
For Each mo As ManagementObject In moc
If cpuInfo = "" Then
cpuInfo = mo.Properties("processorID").Value.ToString()
Exit For
End If
Next
Dim HWID As String
HWID = cpuInfo
'Checks if it matches your Database
Dim wc As New WebClient
Dim strings As String
strings = wc.DownloadString("http://yoursite/DataBase.php") 'Link to your uploaded file.
wc.Dispose() 'Deletes the file it check HWID from.
If strings.Contains(HWID) Then 'If it does, show the program.
MessageBox.Show("HWID Matches!", "Open!", MessageBoxButtons.OK, MessageBoxIcon.Information)
'Now program as normal.
Else
MessageBox.Show("Error, HWID Does Not Match!", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error)
Me.Close() 'If not, close the program and give a message.
End If
End Sub
End Class
Click Add Reference
then on the keyboard press "s" and look for system.management
and double click it and it shoudl work fine!
if you have any problems PM Me!!!
-DeHaterZ