Dim m_MpqFiletime As Long
Dim m_MpqFilename As String
Dim m_ValueString As Byte()
Dim ServerToken As UInteger
Dim ClientToken As UInteger
Debug.Print("SID_AUTH_INFO Received.")
Dim rec0x50 As New BncsReader(bytes)
Dim LogonType As Integer = rec0x50.ReadUInt32()
Dim strCDKEY As String = "mycdkey was here"
ClientToken = GetTickCount
ServerToken = rec0x50.ReadUInt32()
Debug.Print(StrToHex(ServerToken.ToString))
rec0x50.Seek(4)
m_MpqFiletime = rec0x50.ReadUInt64()
m_MpqFilename = rec0x50.ReadCString()
m_ValueString = rec0x50.ReadByteArray(16)
Debug.Print("VALUESTRING LENGTH: " & m_ValueString.Length)
Debug.Print(Hex(m_ValueString(0)) & " " & Hex(m_ValueString(15)))
'Dim m_ServerSig() As Byte = rec0x50.ReadByteArray(128) '-- For War3 only
If LogonType = &H0 Then
Debug.Print("Using Broken SHA-1 Login")
ElseIf &H2 Then
Debug.Print("Using New Login System Version 2.")
Else
Debug.Print("Unsupported Login Version System")
End If
m_MpqFilename = Replace(m_MpqFilename, ".mpq", ".dll")
Debug.Print(m_MpqFilename & " : " & m_MpqFilename.Length)
'-- BUILD 0x51 PACKET
Debug.Print("Building SID_AUTH_CHECK Packet")
Dim m_Files(2) As String
Dim sLockdownFile As String
Dim sImageFile As String
m_Files(0) = "N:\Documents\Programming\VB\prjz0rgBot\hashes\STAR\Starcraft.exe"
m_Files(1) = "N:\Documents\Programming\VB\prjz0rgBot\hashes\STAR\Storm.dll"
m_Files(2) = "N:\Documents\Programming\VB\prjz0rgBot\hashes\STAR\Battle.snp"
sLockdownFile = "N:\Documents\Programming\VB\prjz0rgBot\dll\" & m_MpqFilename
sImageFile = "N:\Documents\Programming\VB\prjz0rgBot\hashes\STAR\STAR.bin"
Dim m_EXEVer As Integer
Dim m_Checksum As Integer
Dim m_EXEINfo As Byte()
m_EXEINfo = CheckRevision.DoLockdownCheckRevision(m_ValueString, m_Files, sLockdownFile, sImageFile, m_EXEVer, m_Checksum)
Dim CDKeyDecoded As New MBNCSUtil.CdKey(strCDKEY)
Dim m_HashLength As Byte() = CDKeyDecoded.GetHash(ClientToken, ServerToken)
Dim dBytes As Byte() = m_EXEINfo
Dim str As String
Dim enc As New System.Text.ASCIIEncoding
str = enc.GetString(dBytes)
Dim C0x51 As New BncsPacket(&H51)
With C0x51
.InsertInt32(ClientToken) '-- ClientToken
.InsertInt32(m_EXEVer) '-- EXEVersion
.InsertInt32(m_Checksum) '-- Check Revision Result
.InsertInt32(1) '-- # of keys. Since SC then 1
.InsertBoolean(False) '-- Is it spawn?
.InsertInt32(CDKeyDecoded.Key.Length) '-- length of cdkey
'.InsertInt32(CDKeyDecoded.Product) '-- Product
.InsertInt32(1)
.InsertInt32(CDKeyDecoded.Value1) '-- Value 1
.InsertInt32(0)
.InsertByteArray(m_HashLength) '-- Keyhash
'.InsertCString(System.Text.ASCIIEncoding.ASCII.GetString(m_EXEINfo)) 'EXE Info
.InsertByteArray(m_EXEINfo)
.InsertCString("ZeRGKoG") 'CDKey Owner
End With
Debug.Print(C0x51.ToString)
I GET INVALID VERSION .. any help.. thanks
Dim m_MpqFilename As String
Dim m_ValueString As Byte()
Dim ServerToken As UInteger
Dim ClientToken As UInteger
Debug.Print("SID_AUTH_INFO Received.")
Dim rec0x50 As New BncsReader(bytes)
Dim LogonType As Integer = rec0x50.ReadUInt32()
Dim strCDKEY As String = "mycdkey was here"
ClientToken = GetTickCount
ServerToken = rec0x50.ReadUInt32()
Debug.Print(StrToHex(ServerToken.ToString))
rec0x50.Seek(4)
m_MpqFiletime = rec0x50.ReadUInt64()
m_MpqFilename = rec0x50.ReadCString()
m_ValueString = rec0x50.ReadByteArray(16)
Debug.Print("VALUESTRING LENGTH: " & m_ValueString.Length)
Debug.Print(Hex(m_ValueString(0)) & " " & Hex(m_ValueString(15)))
'Dim m_ServerSig() As Byte = rec0x50.ReadByteArray(128) '-- For War3 only
If LogonType = &H0 Then
Debug.Print("Using Broken SHA-1 Login")
ElseIf &H2 Then
Debug.Print("Using New Login System Version 2.")
Else
Debug.Print("Unsupported Login Version System")
End If
m_MpqFilename = Replace(m_MpqFilename, ".mpq", ".dll")
Debug.Print(m_MpqFilename & " : " & m_MpqFilename.Length)
'-- BUILD 0x51 PACKET
Debug.Print("Building SID_AUTH_CHECK Packet")
Dim m_Files(2) As String
Dim sLockdownFile As String
Dim sImageFile As String
m_Files(0) = "N:\Documents\Programming\VB\prjz0rgBot\hashes\STAR\Starcraft.exe"
m_Files(1) = "N:\Documents\Programming\VB\prjz0rgBot\hashes\STAR\Storm.dll"
m_Files(2) = "N:\Documents\Programming\VB\prjz0rgBot\hashes\STAR\Battle.snp"
sLockdownFile = "N:\Documents\Programming\VB\prjz0rgBot\dll\" & m_MpqFilename
sImageFile = "N:\Documents\Programming\VB\prjz0rgBot\hashes\STAR\STAR.bin"
Dim m_EXEVer As Integer
Dim m_Checksum As Integer
Dim m_EXEINfo As Byte()
m_EXEINfo = CheckRevision.DoLockdownCheckRevision(m_ValueString, m_Files, sLockdownFile, sImageFile, m_EXEVer, m_Checksum)
Dim CDKeyDecoded As New MBNCSUtil.CdKey(strCDKEY)
Dim m_HashLength As Byte() = CDKeyDecoded.GetHash(ClientToken, ServerToken)
Dim dBytes As Byte() = m_EXEINfo
Dim str As String
Dim enc As New System.Text.ASCIIEncoding
str = enc.GetString(dBytes)
Dim C0x51 As New BncsPacket(&H51)
With C0x51
.InsertInt32(ClientToken) '-- ClientToken
.InsertInt32(m_EXEVer) '-- EXEVersion
.InsertInt32(m_Checksum) '-- Check Revision Result
.InsertInt32(1) '-- # of keys. Since SC then 1
.InsertBoolean(False) '-- Is it spawn?
.InsertInt32(CDKeyDecoded.Key.Length) '-- length of cdkey
'.InsertInt32(CDKeyDecoded.Product) '-- Product
.InsertInt32(1)
.InsertInt32(CDKeyDecoded.Value1) '-- Value 1
.InsertInt32(0)
.InsertByteArray(m_HashLength) '-- Keyhash
'.InsertCString(System.Text.ASCIIEncoding.ASCII.GetString(m_EXEINfo)) 'EXE Info
.InsertByteArray(m_EXEINfo)
.InsertCString("ZeRGKoG") 'CDKey Owner
End With
Debug.Print(C0x51.ToString)
I GET INVALID VERSION .. any help.. thanks