• Welcome to Valhalla Legends Archive.
 

"Invalid Verison"

Started by Freeware, October 31, 2003, 04:50 PM

Previous topic - Next topic

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:

           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


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:

   Case &H1
       CdkeyHash1 = Mid(data, 12)
       GTC = Val("&H" & StrToHex(StrReverse(Mid(data, 8, 4))))
       GTC = CLng(GTC)
       Send0x51


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.


Kp

#1
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.]
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

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

Freeware

Not-Working:

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


Working:

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


This cdkey is voided so I dont care about x'ing it out.

iago

A nice even 25 bytes per line?

The traditional way is 16 bytes/line in hex, then in ascii.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Arta

Some things to check:

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

Freeware

Quote from: Arta[vL] on November 01, 2003, 05:52 PM
Some things to check:

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

I posted my code for BNLS / 0x51 above, and my SC version byte is &HC7 (which is correct).

Hazard

I think he was trying to get you to review it yourself.

"Courage is being scared to death - but saddling up anyway." --John Wayne

Freeware

Quote from: Hazard on November 02, 2003, 04:35 PM
I think he was trying to get you to review it yourself.

Im sure the format is fine since every client works EXCEPT starcraft and broodwar.