Valhalla Legends Forums Archive | Visual Basic Programming | Check Revision Failed

AuthorMessageTime
Yegg
Ok, for my bot which i've setup to use TCP, im pretty sure everything is setup up CORRECTLY, but when i try to connect i get the Check Revision Failed error. Does ne1 know a common reason why this error is recerived, or is there a newer version of checkrevision.dll i should have?
October 26, 2004, 11:00 PM
Soul Taker
[quote author=Yegg link=topic=9328.msg86241#msg86241 date=1098831646]
Ok, for my bot which i've setup to use TCP, im pretty sure everything is setup up CORRECTLY, but when i try to connect i get the Check Revision Failed error. Does ne1 know a common reason why this error is recerived, or is there a newer version of checkrevision.dll i should have?
[/quote]
It's recieved because you didn't send what the server thinks you should have sent.  Additionally, you may have set a record for "Least amount of information to help someone posted"  :P
October 27, 2004, 12:47 PM
Yegg
Ok im not sure wut info i should giv u but heres a few things that may help.

[code]AddChat "Connecting..." & vbNewLine, vbYellow
    sckBnet.Close
    Set chatbot = New bnetchat
    sckBnet.Connect varServer, 6112

Private Sub sckBnet_connect()
    SendHeader
    Send1E
    AddChat "BNET: 1E Sent!" & vbNewLine, vbGreen
End Sub

Private Sub sckbnet_DataArrival(ByVal bytesTotal As Long)
    Static strBuffer As String
    Dim strTemp As String, lngLen As Long
    sckBnet.GetData strTemp, vbString

    strBuffer = strBuffer & strTemp
    While Len(strBuffer) > 4
      lngLen = Val("&H" & StrToHex(StrReverse(Mid(strBuffer, 3, 2))))
      If Len(strBuffer) < lngLen Then Exit Sub
       parsep (Left(strBuffer, lngLen))
       
      strBuffer = Mid(strBuffer, lngLen + 1)
    Wend
End Sub

Public Sub SendHeader()
    Form1.sckBnet.SendData Chr(1)
End Sub

Public Function Send1E()
    pbuffer.InsertDWORD 1
    pbuffer.InsertDWORD 0
    pbuffer.InsertDWORD 0
    pbuffer.InsertDWORD 0
    pbuffer.InsertDWORD 1
    pbuffer.InsertNTString "123"
    pbuffer.InsertNTString "123"
    pbuffer.sendPacket &H1E
    pbuffer.InsertNonNTString "68XI" & varProduct
    pbuffer.InsertDWORD "&H" & "C7"
    pbuffer.InsertDWORD 0
    pbuffer.sendPacket &H6
pbuffer.InsertDWORD 0
pbuffer.sendPacket &H25

End Function

Public Sub SendCDKey(cdkey As String)
On Error Resume Next
    If varProduct = "RTSJ" Then
    pbuffer.InsertDWORD &H0
    pbuffer.InsertNTString Mid(varCDKey, 5, Len(varCDKey) - 4)
    pbuffer.InsertNTString "123"
    pbuffer.sendPacket &H30
Else
Dim lngSeed As Long, lngKey As Long, lngProdID As Long, lngValue1 As Long, lngValue2 As Long, lngValue3 As Long
Dim dblProdID As Double, dblValue1 As Double, dblValue2 As Double, dblSeed As Double, dblkey As Double
    dblSeed = Val("&h" & StrToHex(StrReverse(serverhash)))
    dblkey = GetTickCount()
    lngSeed = CLng(dblSeed)
    lngKey = CLng(dblkey)
    Call DecodeCDKey(cdkey, dblProdID, dblValue1, dblValue2)
    lngProdID = CLng(dblProdID)
    lngValue1 = CLng(dblValue1)
    lngValue2 = CLng(dblValue2)
    Call HashCDKey(lngKey, lngSeed, lngProdID, lngValue1, lngValue2)
    pbuffer.InsertDWORD &H0
    pbuffer.InsertDWORD Len(cdkey)
    pbuffer.InsertDWORD CLng(dblProdID)
    pbuffer.InsertDWORD CLng(dblValue1)
    pbuffer.InsertDWORD CLng(dblSeed)
    pbuffer.InsertDWORD CLng(dblkey)
    pbuffer.InsertDWORD lngKey
    pbuffer.InsertDWORD lngSeed
    pbuffer.InsertDWORD lngProdID
    pbuffer.InsertDWORD lngValue1
    pbuffer.InsertDWORD lngValue2
    pbuffer.InsertNTString "123"
    pbuffer.sendPacket &H36
    End If
End Sub

Public Sub SendUsernamePassword()
On Error Resume Next
Dim dbseed As Double
Dim dblkey As Double
Dim dblSeed As Double
Dim lngSeed As Long
Dim lngKey As Long
Dim lngValue1 As Long
Dim lngValue2 As Long
Dim lngValue3 As Long
'Name = varUser
'pass = varPass
dblSeed = Val("&h" & StrToHex(StrReverse(serverhash)))
dblkey = GetTickCount
lngSeed = CLng(dblSeed)
lngKey = CLng(dblkey)
HashPass varPass, Len(varPass), lngKey, lngSeed, lngValue1, lngValue2, lngValue3
pbuffer.InsertDWORD CLng(dblkey)
pbuffer.InsertDWORD CLng(dblSeed)
pbuffer.InsertDWORD lngKey
pbuffer.InsertDWORD lngSeed
pbuffer.InsertDWORD lngValue1
pbuffer.InsertDWORD lngValue2
pbuffer.InsertDWORD lngValue3
pbuffer.InsertNTString varUser
pbuffer.sendPacket &H29
End Sub[\code]

Now obviously this isn't the code that is put in modules or class mods.
If ttheres no problem with ne of this code tel me and i'll giv u the code from the modules, but im sure those r done correctly.[/code][code][/code]
October 27, 2004, 10:10 PM
CrAz3D
Do you have the hash files in the correct directory?... ;)
October 27, 2004, 10:15 PM
Yegg
yes, my hash files r in the correct directory. also, my checkrevision.dll wus modified in 2001, should i have a newer version?
October 27, 2004, 10:37 PM
LivedKrad
Hmm, *reminisces on the coding of Feanor's bot. Finds amazing similarities between the posted code and Feanor's*. Also, 2001? I don't know if the CheckRevision function used in the DLL is "outdated". I didn't think the CheckRevision function changed at all.
October 27, 2004, 10:41 PM
Quarantine
Im pretty sure Feanors TCP Connection uses Bnetauth.dll
October 27, 2004, 10:52 PM
CrAz3D
[quote author=Warrior link=topic=9328.msg86361#msg86361 date=1098917542]
Im pretty sure Feanors TCP Connection uses Bnetauth.dll
[/quote]Quite a few do...is there a problem with that?
October 28, 2004, 12:11 AM
Yegg
ok, well now that i know checkrevision.dll's date doesn't matter. just in case, i found a version of bnetauth.dll from 2004. but i stil have the check revision error. does ne1 think that they need to see more code in order 2 help me?
October 28, 2004, 12:30 AM
CrAz3D
You have the updated hashes?
October 28, 2004, 12:58 AM
Twix
is it me or the verbyte is c7 when it should be c9
October 28, 2004, 1:02 AM
Yegg
yesi hav updated hashed and i changed "c7" to verByte and all that is setup correctly, but mayb ur right, mayb starcraft is c9 and not c7, i'll try it out.
October 28, 2004, 1:32 AM
Dyndrilliac
[quote author=Twix link=topic=9328.msg86374#msg86374 date=1098925339]
is it me or the verbyte is c7 when it should be c9[/quote]Your right, he has a bad VerByte.

[quote author=Yegg link=topic=9328.msg86351#msg86351 date=1098915024]
    pbuffer.InsertDWORD "&H" & "C7"[/quote]It needs to be C9, assuming you're trying to logon STAR/SEXP.
October 28, 2004, 1:34 AM
Quarantine
Well yea, I figured since hes trying to use CheckRevision.dll...
October 28, 2004, 1:38 AM
Yegg
well, i tried it with C9 and it stil fails, i think theres something missing but i hav no clu wut.
October 28, 2004, 1:50 AM
LivedKrad
[quote]  pbuffer.InsertDWORD "&H" & "C7"[/quote]

If I'm not mistaken, the above does the following:
1. Creates a DWORD value from given data.
2. Suggests that the data given is a string.

Would this code not ultimately send "&HC7" and not &HC7? Please, correct me if I'm wrong.
October 28, 2004, 5:06 PM
Quarantine
You are correct you dont send it in quotes I also dont see the point in sending "&H"&"C7" (which is the wrong Version Byte btw) Id do

[code]
PBuffer.InsertDWORD &HC9
[/code]
October 28, 2004, 6:24 PM
EviL_MarinE
Why not just put

[code]
pbuffer.InsertDWORD "&HC9"
[/code]

Try that and maybe it'll work (sum1 correct me if im wrong plz)

October 28, 2004, 6:50 PM
Quarantine
Read at my post you wont be sending a verbyte more like a string to Battle.net by putting quotes around it .
October 28, 2004, 9:39 PM
LivedKrad
Let's take a look for a second at what we're actually sending here, a verbyte. The short-hand verbyte stands for Version Byte. So, it would seem the data type we're dealing with here is a Byte. We're sending 1 small piece of data inside the packet to identify the client's version. If we were to send it as a string, I believe the DWORD function would create something that is around ?16? bytes long? This is obviously 15 bytes over the size of the supposed "verbyte". Does that clear things up?
October 28, 2004, 9:50 PM
Yegg
Ok i know have:

pbuffer.InsertDWORD &HC9

and i still get the chech revision error, so im assuming that this isn't the problem ne more. mayb the bot is trying to get the wrong verByte somewhere else? For instance, the code in my TCPConnection.cls contains:

[code]Private Function GetVerByte() As Integer
On Error Resume Next
Select Case varProduct
        Case "RATS", "PXES"
            GetVerByte = 199
        Case "NB2W"
            GetVerByte = 79
        Case "VD2D", "PX2D"
            GetVerByte = 9
        Case "3RAW", "PX3W"
            GetVerByte = 12
    End Select
End Function[\code]

Is this code correct?

Also, the pbuffer.InsertDWORD &HC9 line of code is under my Public Function Send1E(), and b4 i get the check revision error, it says that IE was sent. so this should cancel out a problem with the verbytes right?[/code]
October 28, 2004, 11:44 PM
Dyndrilliac
You didn't read Warriors post.

Try InsertBYTE.
October 29, 2004, 2:02 AM
LivedKrad
No, that's wrong. The data type required for the version byte is DWORD.
October 29, 2004, 12:36 PM
Quarantine
Yes its a DWORD and thats a function called to get the Verbyte if you look closely.
October 29, 2004, 5:12 PM
Yegg
ok ty for all ur help guys, i no longer hav the check revision error, now after it says 1E Sent, it goes to disconnected. so im going to work on trying to find out why and see wut happens.

Edit: I found another spot in the code that used InsertDWORD &HC9 so i changed that to InsertBYTE &HC9, I know get the following error:

Bnet error 10053 - Connection is aborted due to timeout or other failure

does this mean a hav yet another error to find? or insertbyte is wrong, or my hashed r outdated?
October 29, 2004, 6:55 PM
l2k-Shadow
Well if I may give a few pointers...

First, using 0x1E is not the best idea. 0x50 is the way to go. Second, Instead of using CheckRevision.dll and Hash.dll, BnetAuth.dll does more than those 2 combined.

Now [url]http://bnetdocs.valhallalegends.com[/url] is excellent for Battle.net packet reference. Let me remind you that each packet you receive, the actual packet starts on the 5th character. Now I know that noone will post the code for you... so check out bnetdocs. If you can't use that, then you might want to stay with CSB for awhile until you learn more.
October 29, 2004, 7:41 PM
LivedKrad
Why is 1E not a good logon method? Second, I see nothing wrong with CheckRevision.dll or Hash.dll.

Anyway, when he said the packet starts on the 5th character, he's wrong.
The packet starts on the first character. What he meant to say was the actual packet's "information data" starts on the 5th character (most of the time). Typically, if using VB, most people will do something like the following: pData = Mid(packet, 5).
October 29, 2004, 9:40 PM
Quarantine
Id rather have one BnetAuth.dll then a CheckRevision.dll and a Hash.dll, also I perfer 1E because it can load WC2 so it kills two birds with one stone .
October 30, 2004, 12:24 AM
UserLoser.
[quote author=LivedKrad link=topic=9328.msg86450#msg86450 date=1099000229]
Let's take a look for a second at what we're actually sending here, a verbyte. The short-hand verbyte stands for Version Byte. So, it would seem the data type we're dealing with here is a Byte. We're sending 1 small piece of data inside the packet to identify the client's version. If we were to send it as a string, I believe the DWORD function would create something that is around ?16? bytes long? This is obviously 15 bytes over the size of the supposed "verbyte". Does that clear things up?
[/quote]

Note that a DWORD is typically an unsigned long which is 4 bytes (32 bits) in size
October 30, 2004, 6:46 AM
LivedKrad
[quote author=UserLoser link=topic=9328.msg86592#msg86592 date=1099118775]
[quote author=LivedKrad link=topic=9328.msg86450#msg86450 date=1099000229]
Let's take a look for a second at what we're actually sending here, a verbyte. The short-hand verbyte stands for Version Byte. So, it would seem the data type we're dealing with here is a Byte. We're sending 1 small piece of data inside the packet to identify the client's version. If we were to send it as a string, I believe the DWORD function would create something that is around ?16? bytes long? This is obviously 15 bytes over the size of the supposed "verbyte". Does that clear things up?
[/quote]

Note that a DWORD is typically an unsigned long which is 4 bytes (32 bits) in size
[/quote]

Yes, a DWORD is 4 bytes. However, what I was saying was that the function would create a DWORD out of a string, instead of a singular byte.
October 30, 2004, 5:50 PM
l2k-Shadow
[quote author=Warrior link=topic=9328.msg86562#msg86562 date=1099095848]
Id rather have one BnetAuth.dll then a CheckRevision.dll and a Hash.dll, also I perfer 1E because it can load WC2 so it kills two birds with one stone .
[/quote]

0x50 loads WC2 also. i think only some mac version of w2 still uses 1E
October 30, 2004, 6:02 PM
Quarantine
Hmm never knew.
October 30, 2004, 6:55 PM

Search