Results 1 to 1 of 1
  1. #1
    Grooguz
    Grooguz is offline
    BanHammer Holder
    Grooguz's Avatar
    Join Date
    2010 May
    Posts
    678
    Thanks Thanks Given 
    152
    Thanks Thanks Received 
    537
    Thanked in
    167 Posts
    Rep Power
    15

    An Advanced auth system based on Hardware Identification

    First of all, what is a HWID?

    Short for Hardware Identification, a security measure used by Microsoft upon the activation of the Windows operating system. As part of the Product Activation system, a unique HWID number is generated when the operating system is first installed. The HWID identifies the hardware components that the system is utilizing, and this number is communicated to Microsoft. Every 10 days and at every reboot the operating system will generate another HWID number and compare it to the original to make sure that the operating system is still running on the same device. If the two HWID numbers differ too much then the operating system will shut down until Microsoft reactivates the product.

    The theory behind HWID is to ensure that the operating system is not being used on any device other than the one for which it was purchased and registered. However, problems can arise when users start replacing or adding hardware components -- such as motherboards, sound cards, CD-R drives, Ethernet adapters -- because these will generate new HWIDs, and if there are too many differences from the original installation number the system will register that the operating system has been installed on a different device than the original and subsequently shut itself down. The only way to resolve the issue is to telephone Microsoft and explain the new hardware in order to obtain a new code.
    Add Modules:
    • vBulletin
    • vbloginsystem
    • httpworker


    All the imports:
    Code:
    Imports System.Security.Cryptography
    
    Impcrts System.IO
    Imports System.Net.Mail
    Imports System.Text
    Imports System.Web
    Imports System.Management
    Imports System.Net
    Imports System
    
    Imports System.Collections.Generic Imports System.Linq Imports DevComponents.UI Imports System.Data.SqlClient Imports System.Web.Services.Description Imports System.Configuration Imports System.Xml.Serialization Imports System.Net.CookieContainer Imports System.Net.Sockets Imports System.Data.OleDb
    
    Imports System.Reflection
    Yes, I know there are many items to quote import
    Next, this procedure calls to retrieve the user of the application hardware ID and recieves and and send an email.
    Code:
    Public Class Form1
    
    Dim result As Integer
    
    Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer Private Declare Function GetAnyncKeySync Lib "user32" (ByVal vKey As Long) As Integer Dim mail As New MailMessage() Dim SmtpServer
    
    Public cpuInfo As String = String.Empty
    Public hwid As String = cpuInfo
    Dim strUser As String, strPass As String
    Dim objSendMail As New Message
    Dim strEmailAddress As String
    Dim MyC As Integer
    Dim MyY As Integer
    Dim objConn As New OleDbConnection
    Dim objCmd As New OleDbCommand
    Dim strConnString, strSQL As String
    Dim whole_file As String
    Dim username() As String
    Dim i As Integer
    Dim txt As String
    This allows the program to decrypt and read MD5 Hash encryptions
    and tells the user if they are connected to the internet
    Code:
    Private Sub Forml_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    If My.Computer.Network.IsAvailable Then
    
    lblConnectStatus.Text = ("Internet Status: Online")
    
    Else
    
    lblConnectStatus.Text = ("Internet Status: Offline") End If
    
    strUser = ComboBoxExl.Text
    Dim md5 As MD5CryptoServiceProvider = New MD5CryptoServiceProvider
    
    Dim f As FileStream = New FileStream(TextBoxXl.Text, FileMode.Open, FileAccess.Read, FileShare.Read, 8192) f = New FileStream(TextBoxXl.Text, FileMode.Open, FileAccess.Read, FileShare.Read, 8192) md5.ComputeHash(f)
    
    Dim ObjFSO As Object = CreateObject("Scripting.FileSystemObject") Dim objFile = ObjFSO.GetFile(TextBoxXl.Text)
    Dim hash As Byte() = MD5.Hash
    
    Dim buff As StringBuilder = New StringBuilder
    
    Dim hashByte As Byte
    
    For Each hashByte In hash
    
    buff.Append(String.Format("{0:X1}", hashByte))
    
    Next
    And the rest is pretty easy, i will type this code for you :68:
    Code:
      Friend Function GetProcessorId() As String
            Dim strProcessorId As String = String.Empty
            Dim query As New SelectQuery("Win32_processor")
            Dim search As New ManagementObjectSearcher(query)
            Dim info As ManagementObject
    
            For Each info In search.Get()
                strProcessorId = info("processorId").ToString()
            Next
            Return strProcessorId
    
        End Function
    
        Friend Function GetMACAddress() As String
    
            Dim mc As ManagementClass = New ManagementClass("Win32_NetworkAdapterConfiguration")
            Dim moc As ManagementObjectCollection = mc.GetInstances()
            Dim MACAddress As String = String.Empty
            For Each mo As ManagementObject In moc
    
                If (MACAddress.Equals(String.Empty)) Then
                    If CBool(mo("IPEnabled")) Then MACAddress = mo("MacAddress").ToString()
    
                    mo.Dispose()
                End If
                MACAddress = MACAddress.Replace(":", String.Empty)
    
            Next
            Return MACAddress
        End Function
    
        Friend Function GetVolumeSerial(Optional ByVal strDriveLetter As String = "C") As String
    
            Dim disk As ManagementObject = New ManagementObject(String.Format("win32_logicaldisk.deviceid=""{0}:""", strDriveLetter))
            disk.Get()
            Return disk("VolumeSerialNumber").ToString()
        End Function
    
        Friend Function GetMotherBoardID() As String
    
            Dim strMotherBoardID As String = String.Empty
            Dim query As New SelectQuery("Win32_BaseBoard")
            Dim search As New ManagementObjectSearcher(query)
            Dim info As ManagementObject
            For Each info In search.Get()
    
                strMotherBoardID = info("SerialNumber").ToString()
    
            Next
            Return strMotherBoardID
    
        End Function
        Public Function GetHDId() As String
            Dim tmpStr2 As String = ""
            Dim myScop As New Management.ManagementScope("\\" & Environment.MachineName & "\root\cimv2")
            Dim oQuer As New Management.SelectQuery("SELECT * FROM WIN32_DiskDrive")
            Dim oResult As New Management.ManagementObjectSearcher(myScop, oQuer)
            Dim oIte As Management.ManagementObject
            Dim oPropert As Management.PropertyData
            For Each oIte In oResult.Get()
                For Each oPropert In oIte.Properties
                    If Not oPropert.Value Is Nothing AndAlso oPropert.Name = "Signature" Then
                        tmpStr2 = oPropert.Value.ToString
                        Exit For
                    End If
                Next
            Next
            Return tmpStr2
    
        End Function
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    
            Button1.Enabled = False
            Timer1.Enabled = True   
    
            TextBox1.Text = hwid
    
            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 & ComboBoxEx1.Text
    
            Dim mail As New MailMessage()
            Dim SmtpServer As New SmtpClient
            SmtpServer.Credentials = New Net.NetworkCredential("youremail", "emailspassword")
            SmtpServer.Port = 'THE PORT GOES HERE NO QUOTES OR PARENTHESIS'
            SmtpServer.Host = "HOST GOES HERE"
            SmtpServer.EnableSsl = True
            mail.To.Add("email that receives info")
            mail.From = New MailAddress("emailgoeshere")
            mail.Subject = "HWID"
            mail.Body = TextBox1.Text & ComboBoxEx1.Text
            SmtpServer.Send(mail)
            Dim wc3 As New System.Net.WebClient
    
            Dim http3 As String = wc3.DownloadString("URL TO DATABASE.TXT OR PHP")
    
            If http3.Contains(cpuInfo) Then
    
            Else
                MsgBox("Locked Due To Hardware ID Change", MsgBoxStyle.Information, "Check")
            End If
    
            If Login(ComboBoxEx1.Text, TextBoxX1.Text) Then
    
                Me.Hide()
                Form2.Show()
    
                Timer1.Enabled = True
            End If
    
        End Sub
    
        Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
            If MessageBox.Show("Do you want to exit?", "Exit", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
                End
            Else
            End If
        End Sub
    IMAGES:


    Modules



    Author: Sever

    Please register or login to download attachments.


  2. The Following 3 Users Say Thank You to Grooguz For This Useful Post:


Similar Threads

  1. INVedit Advanced Minecraft Inventory Editor
    By Grooguz in forum MineCraft
    Replies: 0
    Last Post: 2011-09-21, 07:55 AM
  2. [Tool] Rift Advanced Combat log Tracker-Parser
    By Grooguz in forum Rift: Planes of Telara
    Replies: 1
    Last Post: 2011-09-20, 11:04 PM
  3. [Info] Badge system rewards
    By Dwar in forum CrossFire Guides, Tutorials
    Replies: 0
    Last Post: 2010-12-17, 07:23 AM
  4. [Guide] Relic Upgrade System in Aika Online
    By in forum Aika Guides, Tutorials
    Replies: 0
    Last Post: 2010-10-29, 04:46 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •