Valhalla Legends Forums Archive | Battle.net Bot Development | "Invalid Verison"

AuthorMessageTime
Freeware
Im using BNLS with my own custom code (not csb).

Every client type works except Starcraft and Broodwar, when I send 0x51 it returns Invalid Version (0x0101).

I have checked the Version\Checksum\Exeinfo against CSB and Local Hashed, and they are the same.

Here is my 0x51 code:
[code]
pB.InsertDWORD ClientKey
pB.InsertDWORD Version
pB.InsertDWORD CheckSum
If Product = "PX2D" Or Product = "PX3W" Then
pB.InsertDWORD &H2
Else
pB.InsertDWORD &H1
End If
pB.InsertDWORD blnSpawn
pB.InsertNonNTString CdkeyHash1
If Product = "PX2D" Or Product = "PX3W" Then
pB.InsertNonNTString CdkeyHash2
End If
pB.InsertNTString ExeInfo
pB.InsertNTString Owner
sendBNET sckBnet, &H51
[/code]

What I want to know is what exactly triggers 0x0101 to be sent.

Could it possibly be that the ClientKey was invalid?
Here is the code I use to obtain it:
[code]
Case &H1
CdkeyHash1 = Mid(data, 12)
GTC = Val("&H" & StrToHex(StrReverse(Mid(data, 8, 4))))
GTC = CLng(GTC)
Send0x51
[/code]

Just for refrence here is the checksum/exeinfo/version for Starcraft.
Checksum: 2003201478
Version: 16842753
Exeinfo: Starcraft.exe 03/28/03 04:21:56 1064960

and the current MPQ was 7 at the time, hope you can help.

October 31, 2003, 10:50 PM
Kp
Was your program paused (as in a debugger) for any period of time when this happened? Does it happen regularly, or sporadically? Does it happen with all MPQ versions or just #7? Is your version byte correct? (Retrieve it using BNLS_GetVersionByte iirc) If none of these seem likely, take a hex dump of the two (one working, one failing), post it labelled as to which is which. Remember to remove cd key information (just x it out in the dump) before you post. Also, depending on your packet dump code, you may need to x it out in the hex dump and in the ASCII listing.

[edit: snipped quote of his post.]
October 31, 2003, 11:01 PM
Freeware
Was your program paused (as in a debugger) for any period of time when this happened? No Does it happen regularly, or sporadically? all the time Does it happen with all MPQ versions or just #7? all Is your version byte correct? yes (Retrieve it using BNLS_GetVersionByte iirc)

im generating a hex dump right now
October 31, 2003, 11:17 PM
Freeware
Not-Working:
[code]
47 43 3E 7A 01 00 01 01 F5 D2 87 D6 01 00 00 00 00 00 00 00 0D 00 00 00 01 00 00 00 3D 4A 06 00 00 00 00 00 61 22 00 77 29 53 32 8C B5 88 1F D4 21 B8 00 0B 41 0A 9B F4 53 74 61 72 63 72 61 66 74 2E 65 78 65 20 30 33 2F 32 38 2F 30 33 20 30 34 3A 32 31 3A 35 36 20 31 30 36 34 39 36 30 00 46 72 65 65 77 61 72 65 00
[/code]

Working:
[code]
E0 DD 3E 7A 01 00 01 01 D3 33 DD 39 01 00 00 00 00 00 00 00 0D 00 00 00 01 00 00 00 3D 4A 06 00 00 00 00 00 63 0E 65 3C BD 4B 5B FF 39 6E 34 61 30 1B 15 C2 0E 5E A0 11 53 74 61 72 63 72 61 66 74 2E 65 78 65 20 30 33 2F 32 38 2F 30 33 20 30 34 3A 32 31 3A 35 36 20 31 30 36 34 39 36 30 00 43 72 41 7A 33 44 00
[/code]

This cdkey is voided so I dont care about x'ing it out.
October 31, 2003, 11:22 PM
iago
A nice even 25 bytes per line?

The traditional way is 16 bytes/line in hex, then in ascii.
October 31, 2003, 11:37 PM
Arta
Some things to check:

- Is your version byte correct?
- Are you passing the correct information to BNLS?
- Are you creating 0x51 correctly?
November 1, 2003, 11:52 PM
Freeware
[quote author=Arta[vL] link=board=17;threadid=3352;start=0#msg26862 date=1067730760]
Some things to check:

- Is your version byte correct?
- Are you passing the correct information to BNLS?
- Are you creating 0x51 correctly?
[/quote]

I posted my code for BNLS / 0x51 above, and my SC version byte is &HC7 (which is correct).
November 2, 2003, 10:10 PM
DrivE
I think he was trying to get you to review it yourself.
November 2, 2003, 10:35 PM
Freeware
[quote author=Hazard link=board=17;threadid=3352;start=0#msg27096 date=1067812536]
I think he was trying to get you to review it yourself.
[/quote]

Im sure the format is fine since every client works EXCEPT starcraft and broodwar.
November 3, 2003, 1:31 AM

Search