Support Forums
Visual Basics Online Protection[2008] - 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: Visual Basics Online Protection[2008] (/showthread.php?tid=12243)

Pages: 1 2


Visual Basics Online Protection[2008] - DeHaterZ - 09-26-2010

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
[Image: plaqll.png]
New...
[Image: nbd9vw.png]
Name the program whatever you like..
[Image: r6bduf.png]

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
all of you will get errors but all you have to do is right click
[Image: j97vgy.png]
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


RE: VB online Protection - ruk00112 - 09-26-2010

Very detailed tut and easy to understand. I read through it and found it a bit easy so im gonna give it a try. If i come across any problems i will be posting them here so that you could help me out and btw thanks a lot for sharing this


RE: VB online Protection - DeHaterZ - 09-26-2010

Anytime if you have any problems and im not online just add m MSN DeHaterZ@live.com


RE: VB online Protection - ruk00112 - 09-26-2010

Added you just in case but ill still be posting here as well


RE: VB online Protection - Kye - 09-26-2010

Sorry, I am very new to this kind of thing
what does this do? protect you programmes?

Thanks for the tut Smile

~Gibson


RE: VB online Protection - DeHaterZ - 09-26-2010

what this program does is that it protects your Program
like if they input their HWID it will check on your server to see if its correct


RE: VB online Protection - ruk00112 - 09-26-2010

Ive seen this type of a HWID used for users keyloggers and RATs and other stuff when they sell them. If your selling your own software this can come in as a very handy tool. Trust me


RE: VB online Protection - DeHaterZ - 09-26-2010

yeah i use it for most of my Programs :]


RE: VB online Protection - ruk00112 - 09-28-2010

Hey pal what version of VB are you using?


RE: VB online Protection - DeHaterZ - 09-28-2010

Im using VB2008