• Welcome to Valhalla Legends Archive.
 

Invalid CDKey.

Started by gentoolinux, April 23, 2005, 07:02 PM

Previous topic - Next topic

Warrior

Well, then show that?
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

gentoolinux

Quote from: Warrior on April 24, 2005, 07:19 PM
Well, then show that?

I'm not sure exactly what you want me to show, i use BNETAUTH.DLL

Spilled

Show us your code of where you send packet 0x51, maybe your error is where you insert the two values?

Warrior

Where you request the keyhash from BnetAuth.
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

gentoolinux

where i call bnetauth


Private Declare Function z Lib "bnetauth.dll" Alias "Z" (ByVal FileExe As String, ByVal FileStormDll As String, ByVal FileBnetDll As String, ByVal HashText As String, ByRef version As Long, ByRef Checksum As Long, ByVal ExeInfo As String, ByVal mpqname As String) As Long


the other crap


    Call InitNLS
    frmMain.Winsock.SendData Chr(1)
    InsertDWORD 0
    InsertNonNTString "68XI" & vProduct
    InsertDWORD GetVerByte()
    InsertDWORD 0
    InsertDWORD 0
    InsertDWORD 0
    InsertDWORD 0
    InsertDWORD 0
    InsertNTString "USA"
    InsertNTString "United States"
    SendPacket &H50
    InsertDWORD 0
    SendPacket &H25
    AddC QBColor(8), "VerByte (Dec): " & GetVerByte()


Eric

I know why you're getting an invalid CD-Key response.  It's because you don't have a damn clue what you're doing.

gentoolinux

Quote from: LoRd[nK] on April 25, 2005, 04:56 PM
I know why you're getting an invalid CD-Key response.  It's because you don't have a damn clue what you're doing.

Wow what an obvious observation....

Spilled

Quote from: gentoolinux on April 25, 2005, 04:53 PM
where i call bnetauth


Private Declare Function z Lib "bnetauth.dll" Alias "Z" (ByVal FileExe As String, ByVal FileStormDll As String, ByVal FileBnetDll As String, ByVal HashText As String, ByRef version As Long, ByRef Checksum As Long, ByVal ExeInfo As String, ByVal mpqname As String) As Long


the other crap


    Call InitNLS
    frmMain.Winsock.SendData Chr(1)
    InsertDWORD 0
    InsertNonNTString "68XI" & vProduct
    InsertDWORD GetVerByte()
    InsertDWORD 0
    InsertDWORD 0
    InsertDWORD 0
    InsertDWORD 0
    InsertDWORD 0
    InsertNTString "USA"
    InsertNTString "United States"
    SendPacket &H50
    InsertDWORD 0
    SendPacket &H25
    AddC QBColor(8), "VerByte (Dec): " & GetVerByte()



Ok, i asked for 0x51 not 0x50. Show me where you send 0x51 and maybe perhaps a packetlog of 0x51? -.-

gentoolinux

#23
I'm not sure where I send 0x51, where would I find that?



    Case &H50
            Servers = Val("&h" & StrToHex(StrReverse(Mid(Data, 9, 4))))
            p0x51 (Data)



thats the only 0x51 i see in the whole bot
that codes:


Private Sub p0x51(Data As String)
Dim Hash As String, mpqname As String, ExeInfo As String, version As Long, Checksum As Long, Result As Long, modDatabaselProdID As Double, modDatabaselValue1 As Double, modDatabaselValue2 As Double, lngProdID As Long, lngValue1 As Long, lngValue2 As Long, Accounthash As String, modDatabaselkey As Long
mpqname = Mid(Data, InStr(Data, "I"), 12)
Hash = Mid(Mid(Data, 34), InStr(Mid(Data, 34), Chr(0)) + 1, InStr(Mid(Mid(Data, 34), InStr(Data, Chr(0)) + 1), Chr(0)))
Hash = Replace(Hash, Chr(0), "")
ExeInfo = Space(256)

'   Select Case vProduct
     '   Case "RATS", "PXES"
         '   Result = z(App.Path & "\star\Starcraft.exe", App.Path & "\star\storm.dll", App.Path & "\star\battle.snp", Hash, version, Checksum, ExeInfo, mpqname)
 
   '     Case "NB2W"
            Result = z(App.Path & "\war2\Warcraft II BNE.exe", App.Path & "\war2\storm.dll", App.Path & "\war2\battle.snp", Hash, version, Checksum, ExeInfo, mpqname)
  '      Case "VD2D"
  '          Result = z(App.Path & "\d2dv\game.exe", App.Path & "\d2dv\bnclient.dll", App.Path & "\d2dv\d2client.dll", Hash, version, Checksum, ExeInfo, mpqname)
  '      Case "PX2D"
  '          Result = z(App.Path & "\d2xp\game.exe", App.Path & "\d2xp\bnclient.dll", App.Path & "\d2xp\d2client.dll", Hash, version, Checksum, ExeInfo, mpqname)
  '      Case "3RAW", "PX3W"
  '          Result = z(App.Path & "\war3\war3.exe", App.Path & "\war3\storm.dll", App.Path & "\war3\game.dll", Hash, version, Checksum, ExeInfo, mpqname)
        'Case "PX3W"
        '    Result = z(App.Path & "\w3xp\war3.exe", App.Path & "\w3xp\storm.dll", App.Path & "\w3xp\game.dll", Hash, version, Checksum, ExeInfo, mpqname)
'   End Select
   
NullTruncString ExeInfo

If vProduct <> "3RAW" And vProduct <> "PX3W" Then
    DecodeCDKey vCDkey, modDatabaselProdID, modDatabaselValue1, modDatabaselValue2
    lngProdID = CLng(modDatabaselProdID)
    lngValue1 = CLng(modDatabaselValue1)
    lngValue2 = CLng(modDatabaselValue2)
    Accounthash = String(5 * 4, vbNullChar)
    c Accounthash, Servers, lngProdID, lngValue1, lngValue2, modDatabaselkey
    If Result = 0 Then
       AddC vbRed, "Hashing Failed"
       frmMain.Winsock.Close
    Exit Sub
    End If
        InsertDWORD modDatabaselkey
        InsertDWORD version
        InsertDWORD Checksum
       
       If varProduct = "PX2D" Then
            InsertDWORD 2
       Else
            InsertDWORD 1
       End If
       
        InsertDWORD 0
        InsertDWORD Len(vCDkey)
        InsertDWORD CLng(modDatabaselProdID)
        InsertDWORD CLng(modDatabaselValue1)
        InsertDWORD 0
        InsertNonNTString Accounthash
         If varProduct = "PX2D" Then
            Dim modDatabaselProdID2 As Double, modDatabaselValue12 As Double, modDatabaselValue22 As Double
            Dim lngProdID2 As Long, lngValue12 As Long, lngValue22 As Long
            Dim AccountHash2 As String, TempString2 As String
           
           
                    DecodeCDKey varCDkey2, modDatabaselProdID2, modDatabaselValue12, modDatabaselValue22
                   
                    lngProdID2 = CLng(modDatabaselProdID2)
                    lngValue12 = CLng(modDatabaselValue12)
                    lngValue22 = CLng(modDatabaselValue22)
                    AccountHash2 = String(5 * 4, vbNullChar)
                    c AccountHash2, Servers, lngProdID2, lngValue12, lngValue22, modDatabaselkey
                   
                    InsertDWORD Len(varCDkey2)
                    InsertDWORD CLng(modDatabaselProdID2)
                    InsertDWORD CLng(modDatabaselValue12)
                    InsertDWORD &H0
                    InsertNonNTString AccountHash2
                End If
Else
    Dim strKeyHash As String, lngProdID3 As Long, lngValue3 As Long
    Call DecodeHashCDKey(vCDkey, modDatabaselkey, Servers, lngProdID3, lngValue3, strKeyHash)
   
    InsertDWORD modDatabaselkey
    InsertDWORD version
    InsertDWORD Checksum
   
    If vProduct = "PX3W" Then
        InsertDWORD &H2
    Else
        InsertDWORD &H1
    End If
   
    InsertDWORD &H0
    InsertDWORD Len(vCDkey)
    InsertDWORD lngProdID3
    InsertDWORD lngValue3
    InsertDWORD &H0
    InsertNonNTString strKeyHash
   
    If vProduct = "PX3W" Then
        Dim strKeyHash2 As String, lngProdID4 As Long, lngValue4 As Long
        Call DecodeHashCDKey(varCDkey2, modDatabaselkey, Servers, lngProdID4, lngValue4, strKeyHash2)
        InsertDWORD Len(varCDkey2)
        InsertDWORD lngProdID4
        InsertDWORD lngValue4
        InsertDWORD &H0
        InsertNonNTString strKeyHash2
    End If

End If
        InsertNTString ExeInfo
        InsertNTString "WebBot"
        SendPacket 81
   
If ExeInfo = "" Then
MsgBox "Error Logging in! If this problem persists then please reopen the bot!"
frmMain.Winsock.Close
Else
AddC QBColor(8), "MPQ Name: " & mpqname
AddC QBColor(8), "Hash Data: " & Hash
AddC QBColor(8), "EXE Information: " & ExeInfo
End If


End Sub

Ringo

#24
Shouldnt Somthing be dim'ed as long
and that somthing =  c(Accounthash, Servers, lngProdID, lngValue1, lngValue2, modDatabaselkey) ?


@edit@
and modDatabaselkey should be valued (with tick count for example)

@Re edit@
try this:
Public Declare Function GetTickCount Lib "kernel32.dll" () As Long



If vProduct <> "3RAW" And vProduct <> "PX3W" Then
    Dim ASDF as long
    modDatabaselkey = gettickcount()
    Call DecodeCDKey(vCDkey, modDatabaselProdID, modDatabaselValue1, modDatabaselValue2)
    lngProdID = CLng(modDatabaselProdID)
    lngValue1 = CLng(modDatabaselValue1)
    lngValue2 = CLng(modDatabaselValue2)
    Accounthash = String(5 * 4, vbNullChar)
    ASDF = c(Accounthash, Servers, lngProdID, lngValue1, lngValue2, modDatabaselkey)
    If Result = 0 Then
       AddC vbRed, "Hashing Failed"
       frmMain.Winsock.Close
    Exit Sub
    End If
        InsertDWORD modDatabaselkey
        InsertDWORD version
        InsertDWORD Checksum
       
       If varProduct = "PX2D" Then
            InsertDWORD 2
       Else
            InsertDWORD 1
       End If
       
        InsertDWORD 0
        InsertDWORD Len(vCDkey)
        InsertDWORD CLng(modDatabaselProdID)
        InsertDWORD CLng(modDatabaselValue1)
        InsertDWORD 0
        InsertNonNTString Accounthash
         If varProduct = "PX2D" Then
            Dim ASDF2 as long
            Dim modDatabaselProdID2 As Double, modDatabaselValue12 As Double, modDatabaselValue22 As Double
            Dim lngProdID2 As Long, lngValue12 As Long, lngValue22 As Long
            Dim AccountHash2 As String, TempString2 As String
           
           
                    Call  DecodeCDKey(varCDkey2, modDatabaselProdID2, modDatabaselValue12, modDatabaselValue22)
                   
                    lngProdID2 = CLng(modDatabaselProdID2)
                    lngValue12 = CLng(modDatabaselValue12)
                    lngValue22 = CLng(modDatabaselValue22)
                    AccountHash2 = String(5 * 4, vbNullChar)
                    ASDF2 = c(AccountHash2, Servers, lngProdID2, lngValue12, lngValue22, modDatabaselkey)
                   
                    InsertDWORD Len(varCDkey2)
                    InsertDWORD CLng(modDatabaselProdID2)
                    InsertDWORD CLng(modDatabaselValue12)
                    InsertDWORD &H0
                    InsertNonNTString AccountHash2
                End If
Else

UserLoser.

Try removing the "Call InitNLS", don't ever have that.  It's bad

gentoolinux

#26
Quote from: UserLoser on April 26, 2005, 04:21 PM
Try removing the "Call InitNLS", don't ever have that.  It's bad

I replaced what i had with the code u pasted and it still isnt working... It still gives me an invalid CDKey.

Userloser the removing InitNLS didnt work either

R.a.B.B.i.T

Try using something that isn't Feanor's TCPConnection class.  That thing sucks hard.

gentoolinux

Quote from: rabbit on April 26, 2005, 05:47 PM
Try using something that isn't Feanor's TCPConnection class.  That thing sucks hard.

Well It's what I started with and it's what I would like to finish with on this project.

Eric

#29
Perhaps if you started your project from scratch, you would actually understand what you're doing and maybe you'd know enough by then to solve your problem without even needing our help.  The members on this forum are glad to help those who are actually willing to try, but when you show little or no effort, then you're on your own.

|