Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Visual Basics Online Protection[2008]
#1
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
Reply
#2
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
[Image: banner.gif]
Reply
#3
Anytime if you have any problems and im not online just add m MSN DeHaterZ@live.com
Reply
#4
Added you just in case but ill still be posting here as well
[Image: banner.gif]
Reply
#5
Sorry, I am very new to this kind of thing
what does this do? protect you programmes?

Thanks for the tut Smile

~Gibson
Feel free to PM about anything, I'm here to help.
Reply
#6
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
Reply
#7
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
[Image: banner.gif]
Reply
#8
yeah i use it for most of my Programs :]
Reply
#9
Hey pal what version of VB are you using?
[Image: banner.gif]
Reply
#10
Im using VB2008
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  VB 2008 - Useful Code Apache 36 16,068 11-25-2012, 10:37 PM
Last Post: ƃu∀ ıʞƃu∀
  [Visual Basic] FTP Uploader [Tutorial] Coding Support 6 3,011 08-12-2012, 12:36 AM
Last Post: Kenneth
  Visual Studio Bill Nye The Science Guy 1 1,032 03-19-2012, 09:08 AM
Last Post: BreShiE
  Visual Basic Guide - Buttons Death Demise 9 5,310 03-09-2012, 06:46 PM
Last Post: BreShiE
  [HELP] Visual Basic JusCaus 5 1,460 11-02-2011, 01:15 PM
Last Post: Party

Forum Jump:


Users browsing this thread: 1 Guest(s)