Author | Message | Time |
---|---|---|
CrAz3D | vb6, I find that the Revision Check is incorrect when using this for receiving x50 [code] servers = Val("&h" & StrToHex(StrReverse(Mid(Data, 9, 4)))) MPQName = Mid(Data, 25, 12) HASH = Mid(Data, 38, Len(Data) - 2) MPQName = Val(Mid(MPQName, 8, 1)) InsertDWORD GetBNLSByte() InsertDWORD CLng(MPQName) InsertNTString HASH exeinfo = SPACE(256) If varProduct = "VD2D" Then Result = CheckRevision(varFiles & exeN & ".exe", varFiles & "bnclient.dll", varFiles & "d2client.dll", HASH, version, CheckSum, exeinfo, MPQName) Else Result = CheckRevision(varFiles & exeN & ".exe", varFiles & "storm.dll", varFiles & "battle.snp", HASH, version, CheckSum, exeinfo, MPQName) End If InsertDWORD GetTickCount() 'Client Token.. InsertDWORD version 'Exe ver InsertDWORD CheckSum 'Exe hash If varProduct = "PX2D" Then InsertDWORD &H2 'key count Else InsertDWORD &H1 'key count End If InsertDWORD &H0 'False (Spawn) 'InsertNonNTString cdkeyhash 'Key Hash InsertNTString varCDkey If varProduct = "PX2D" Or varProduct = "PX3W" Then 'InsertNonNTString Cdkey2Hash 'second key hash InsertNTString varCDKey2 End If InsertNTString exeinfo 'Exe info InsertNTString varUser 'Key Owner sendPacket &H51 If exeinfo = SPACE(256) Then Clear AddChat vbRed, "BNET: Check Revision Failed" Form1.sckBNET.Close Exit Sub End If[/code] Any help would be apreciated, yes I have searched already. | March 1, 2004, 5:13 AM |
LoRd | [quote author=o.OV link=board=17;threadid=5523;start=0#msg46885 date=1078118451] Use BnetAuth.dll [/quote] BnetAuth.dll and CheckRevision.dll have the same CheckRevision functions. [quote author=CrAz3D link=board=17;threadid=5523;start=0#msg46883 date=1078118018] vb6, I find that the Revision Check is incorrect when using this for receiving x50 [code] servers = Val("&h" & StrToHex(StrReverse(Mid(Data, 9, 4)))) MPQName = Mid(Data, 25, 12) HASH = Mid(Data, 38, Len(Data) - 2) MPQName = Val(Mid(MPQName, 8, 1)) InsertDWORD GetBNLSByte() InsertDWORD CLng(MPQName) InsertNTString HASH exeinfo = SPACE(256) If varProduct = "VD2D" Then Result = CheckRevision(varFiles & exeN & ".exe", varFiles & "bnclient.dll", varFiles & "d2client.dll", HASH, version, CheckSum, exeinfo, MPQName) Else Result = CheckRevision(varFiles & exeN & ".exe", varFiles & "storm.dll", varFiles & "battle.snp", HASH, version, CheckSum, exeinfo, MPQName) End If InsertDWORD GetTickCount() 'Client Token.. InsertDWORD version 'Exe ver InsertDWORD CheckSum 'Exe hash If varProduct = "PX2D" Then InsertDWORD &H2 'key count Else InsertDWORD &H1 'key count End If InsertDWORD &H0 'False (Spawn) 'InsertNonNTString cdkeyhash 'Key Hash InsertNTString varCDkey If varProduct = "PX2D" Or varProduct = "PX3W" Then 'InsertNonNTString Cdkey2Hash 'second key hash InsertNTString varCDKey2 End If InsertNTString exeinfo 'Exe info InsertNTString varUser 'Key Owner sendPacket &H51 If exeinfo = SPACE(256) Then Clear AddChat vbRed, "BNET: Check Revision Failed" Form1.sckBNET.Close Exit Sub End If[/code] Any help would be apreciated, yes I have searched already. [/quote] By the looks of it, you're not decoding your CDKey (you have it commented out as a key hash) among a few other things. Try comparing what you're sending to BnetDocs. And as a tip: It looks like your PacketBuffer is in a module, it's much more RAM efficient and easier to use within a class module. Also, the "If exeinfo = SPACE(256) Then" part should be right after you check the executables (before the sending of 0x51) and the message should be something along the lines of "Hashes not found" or something of that sort; trying to connect without hashes will result in an IPBan. | March 1, 2004, 5:32 AM |
o.OV | [quote author=LoRd[nK] link=board=17;threadid=5523;start=0#msg46888 date=1078119125] [quote author=o.OV link=board=17;threadid=5523;start=0#msg46885 date=1078118451] Use BnetAuth.dll [/quote] BnetAuth.dll and CheckRevision.dll have the same CheckRevision functions. [/quote] That is nice.. It was merely a suggestion to use a 2 in 1 dll. :P Add-On: I'm beginning to think craz3d and chr0nic are good friends. | March 1, 2004, 6:57 AM |
CrAz3D | I don't know Chr0nic. I'll go check about the decoding of the cdkey, thnx | March 1, 2004, 2:46 PM |
UserLoser. | [quote][code] servers = Val("&h" & StrToHex(StrReverse(Mid(Data, 9, 4)))) [/code][/quote] There's a lot easier, better, and most likely faster method to get that using RtlMoveMemory (CopyMemory) | March 2, 2004, 2:05 AM |
ChR0NiC | [quote author=o.OV link=board=17;threadid=5523;start=0#msg46891 date=1078124259] That is nice.. It was merely a suggestion to use a 2 in 1 dll. :P Add-On: I'm beginning to think craz3d and chr0nic are good friends. [/quote] Don't beat around the bush slut, come out and say it???? | March 2, 2004, 4:45 AM |
Sidoh | [quote author=o.OV link=board=17;threadid=5523;start=0#msg46891 date=1078124259] [quote author=LoRd[nK] link=board=17;threadid=5523;start=0#msg46888 date=1078119125] [quote author=o.OV link=board=17;threadid=5523;start=0#msg46885 date=1078118451] Use BnetAuth.dll [/quote] BnetAuth.dll and CheckRevision.dll have the same CheckRevision functions. [/quote] That is nice.. It was merely a suggestion to use a 2 in 1 dll. :P Add-On: I'm beginning to think craz3d and chr0nic are good friends. [/quote] Are you so godly? | March 2, 2004, 4:55 AM |
o.OV | [quote author=UserLoser. link=board=17;threadid=5523;start=0#msg47004 date=1078193155] [quote][code] servers = Val("&h" & StrToHex(StrReverse(Mid(Data, 9, 4)))) [/code][/quote] There's a lot easier, better, and most likely faster method to get that using RtlMoveMemory (CopyMemory) [/quote] Example please.. [quote author=Sidoh link=board=17;threadid=5523;start=0#msg47027 date=1078203347] Are you so godly? [/quote] I dunno.. Am I? And I bet you know one of them.. or both even.. lol [quote author=ChR0NiC link=board=17;threadid=5523;start=0#msg47024 date=1078202749] Don't beat around the bush slut, come out and say it???? [/quote] BullsEye!! :D | March 2, 2004, 6:40 AM |
Kp | [quote author=LoRd[nK] link=board=17;threadid=5523;start=0#msg46888 date=1078119125]trying to connect without hashes will result in an IPBan.[/quote] hmm, unless the code is very poorly written, connecting without the appropriate hash files would probably just send uninitialized variables for the version checksum data. You'd get a version mismatch, but you wouldn't get IP banned. Of course, bad code might entirely forget to insert the variables if the checkrevision failed, which would probably cause a ban as you say. | March 4, 2004, 12:05 AM |