Register for your free account! | Forgot your password?

You last visited: Today at 21:48

  • Please register to post and access all features, it's quick, easy and FREE!

 

HWID Class

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2010
Posts: 1,162
Received Thanks: 369
HWID Class

Language = VB.

I don't take credits for any of the content, but I thought I would share it here, because it can be used for banning peoples. It will make them not able to login, even with ipchange. They would have to switch pc. In some cases it will work better than IPBan, but giving both will have a good effect of ban.

All credits goes to Aeonhack

Source:
Code:
Imports System.Text
Imports System.Net.NetworkInformation
Imports System.Management

Class Machine
    Const PN As UShort = 4129

    Private ID(3) As String
    Private Table(255) As UShort
    Private UTF8 As New UTF8Encoding

    Private _HardwareID As String
    ReadOnly Property HardwareID() As String
        Get
            Return _HardwareID
        End Get
    End Property

    Private _Seed As UShort
    Sub New(Optional ByVal seed As UShort = 0)
        Dim R As String = String.Format(" WHERE DeviceID='{0}:'", Environment.SystemDirectory(0))
        ID(0) = Search("Win32_BaseBoard", "SerialNumber")
        ID(1) = Search("Win32_Processor", "ProcessorID")
        ID(2) = Search("Win32_LogicalDisk" & R, "VolumeSerialNumber")
        ID(3) = Search()
        _Seed = seed
        Generate()
    End Sub

    Private Function Search(ByVal element As String, ByVal item As String) As String
        element = String.Format("SELECT {0} FROM {1}", item, element)

        Dim T As New StringBuilder
        Dim U As New ManagementObjectSearcher(element)
        For Each O As ManagementObject In U.Get
            If Not O(item) Is Nothing Then T.Append(O(item))
        Next
        U.Dispose()
        Return T.ToString
    End Function
    Private Function Search() As String
        For Each O As NetworkInterface In NetworkInterface.GetAllNetworkInterfaces
            If O.OperationalStatus = OperationalStatus.Up Then Return O.GetPhysicalAddress.ToString
        Next
        Return String.Empty
    End Function

    Private Function CRC16(ByVal data As Byte()) As UShort
        CRC16 = _Seed
        For I As Integer = 0 To data.Length - 1
            CRC16 = CRC16 << 8 Xor Table(CRC16 >> 8 Xor data(I))
        Next
        _Seed = CRC16
    End Function
    Private Sub CreateTable()
        Dim V, T As UShort
        For I As UShort = 0 To 255
            V = 0
            T = I
            For U As Byte = 0 To 7
                If ((V Xor T) And 1) <> 0 Then V = V >> 1 Xor PN Else V >>= 1
                T >>= 1
            Next
            Table(I) = V
        Next
    End Sub

    Private Sub Generate()
        CreateTable()
        Dim T As New List(Of Byte)
        For I As Byte = 0 To 3
            T.AddRange(BitConverter.GetBytes(CRC16(UTF8.GetBytes(ID(I)))))
        Next
        _HardwareID = BitConverter.ToString(T.ToArray).Replace(Convert.ToChar(45), String.Empty)
    End Sub

    Function Check(ByVal id As String) As Boolean
        If Not id.Length = 16 Then Return False
        id = id.Replace(Convert.ToChar(45), String.Empty).ToUpper

        Dim M As Integer
        For I As Byte = 0 To 15 Step 4
            If Not id.Substring(I, 4) = _HardwareID.Substring(I, 4) Then M += 1
        Next

        If M > 1 Then Return False Else Return True
    End Function
End Class
Generate:
Code:
'We can create a new Machine instance
'with a seed so that the ID is unique to
'our application.

'The current seed is 1234. The range
'you can use is below.

'0 Default - 65535 Maximum
Dim T As New Machine(1234)

'This will return the machines ID.
Dim ID As String = T.HardwareID
Check:
Code:
Dim T As New Machine(1234)

'Here we check if at least 3/4 of
'the components match.
If T.Check(ID) Then
    'We have a match, do something.
End If



Syst3m_W1z4rd is offline  
Old   #2
 
elite*gold: 0
Join Date: Sep 2008
Posts: 1,683
Received Thanks: 505
Honestly not in the mood to read any code longer than 2 lines, so could you please tell me what this does? How do you identify a machine?


Basser is offline  
Old   #3
 
elite*gold: 0
Join Date: Nov 2010
Posts: 237
Received Thanks: 99
Dude research for Hardware ID you will find alot.
|NeoX is offline  
Old   #4
 
elite*gold: 0
Join Date: Nov 2010
Posts: 1,162
Received Thanks: 369
Quote:
Originally Posted by Basser View Post
Honestly not in the mood to read any code longer than 2 lines, so could you please tell me what this does? How do you identify a machine?
Motherboard, processor, hard drive etc. That's what this can do.


Syst3m_W1z4rd is offline  
Old   #5
 
elite*gold: 0
Join Date: Jun 2005
Posts: 686
Received Thanks: 337
Correct me if I'm wrong, but wouldn't this need to be run client-side?
nTL3fTy is offline  
Old   #6
 
elite*gold: 0
Join Date: Sep 2007
Posts: 568
Received Thanks: 100
Quote:
Originally Posted by nTL3fTy View Post
Correct me if I'm wrong, but wouldn't this need to be run client-side?
That is exactly what i was thinking.
StarBucks is offline  
Old   #7
 
elite*gold: 0
Join Date: Nov 2010
Posts: 1,162
Received Thanks: 369
Quote:
Originally Posted by nTL3fTy View Post
Correct me if I'm wrong, but wouldn't this need to be run client-side?
Yup, then you make it interact with the server
Syst3m_W1z4rd is offline  
Old   #8
 
elite*gold: 0
Join Date: Nov 2010
Posts: 237
Received Thanks: 99
HWID As UID as example


|NeoX is offline  
Reply



« Previous Thread | Next Thread »

Similar Threads
HWID Generator & Dev-Tools für e*pvp's HWID System
Hier die Downloads passend zum News-Thread, da das Attachen von Daten an News-Threads nicht möglich ist ;) News-Thread:...
0 Replies - Main



All times are GMT +2. The time now is 21:48.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.