• Welcome to Valhalla Legends Archive.
 

Manually locating current starcraft/broodwar version byte

Started by Okee, January 04, 2005, 03:58 PM

Previous topic - Next topic

Okee

I used to be into the bot scene a year or so ago, but never actually found the version bytes myself. I'd always ask somebody or something. Anywho, my simple binary bot now cannot connect using starcraft/broodwar/warcraft 2 bne. I'm sure the connection sequences have not changed. My bot uses the 0x51 connection sequence. It's just the version byte.

I'm interested in finding this myself, so I can reference it in the future if it changes again. My question is, how do I go about finding it? I'm sure I'll have to look at one of the game files (battle.snp?) in a dissassembler or something. Anyone know any details relating to this topic?

Thanks in advance.

Hdx

Nothing like that should be required. Simply PacketLoggin a successfull login by the acuall client. and then looking at 0x50 as send by the clint. You should be able to get the verByte out of it.
0x50

As it says there, it is the 4th DWORD in the packet.
~-~(HDX)~-~

Proud host of the JBLS server www.JBLS.org.
JBLS.org Status:
JBLS/BNLS Server Status

Mephisto


MyndFyre

These will change, though, when a new version is released.  What if I want to determine the version byte independently of having to release a new bot and want to avoid using BNLS?
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Arta

I'd probably do it by trying to brute-force the new value. It nearly always only goes up by 1 anyway. If you tried, say, the next 5 values, I don't think you'd get IP banned, and you'd probably find the correct one.

There's no reliable way to retrieve the new version byte from the game files programatically.

R.a.B.B.i.T

I've noticed that the Starcraft/Brood War bytes are jumping by 2 (IE: 0xc5 -> 0xc7 -> 0xc9).  Anyone know why that is?

Maddox

Quote from: R.a.B.B.i.T on January 04, 2005, 09:05 PM
I've noticed that the Starcraft/Brood War bytes are jumping by 2 (IE: 0xc5 -> 0xc7 -> 0xc9).  Anyone know why that is?

1.10b, 1.11b, etc?
asdf.

Ringo

Quote from: Okee on January 04, 2005, 03:58 PM
I used to be into the bot scene a year or so ago, but never actually found the version bytes myself. I'd always ask somebody or something. Anywho, my simple binary bot now cannot connect using starcraft/broodwar/warcraft 2 bne. I'm sure the connection sequences have not changed. My bot uses the 0x51 connection sequence. It's just the version byte.

I'm interested in finding this myself, so I can reference it in the future if it changes again. My question is, how do I go about finding it? I'm sure I'll have to look at one of the game files (battle.snp?) in a dissassembler or something. Anyone know any details relating to this topic?

Thanks in advance.

Every programer should have a packet logger of some kind to log the needed data to write there bot.
I persionaly use this:
http://dlh.net/getfile.php?77:/gamehacking/packeteditors/WPEXP.zip
Its very simple to use, and this is how to go about getting the new version bytes:
Once a new patch comes out, log onto the client and download the new patch, then replace your hash files with the new ones. Once u have done this, target the program you wish to packet log (Starcraft or somthing) then press play.  Now tab into the program you are running a packet log on and do what u want to log, IE: Logon. Then press stop and al the logged packets sent/receved from the program will be shown.
Here is a example of what/where to get the new version bytes:
On logon for older clients like warcraft 2, then this is the packet to look out for on the logon:

Send:
0000  FF 06 14 00 36 38 58 49 4E 42 32 57 4F 00 00 00    ....68XINB2WO...
0010  00 00 00 00                                        ....

The versionbyte is always the DWord after the client ID, so in this case, war2 version byte was 0x4F

And for newer games such as sc/bw/d2 this is the packet to look out for:

Send:
01 FF 50 3A 00 00 00 00 00 36 38 58 49 50 58 45    ..P:.....68XIPXE
53 C9 00 00 00 00 00 00 00 00 00 00 00 3C 00 00    S............<..
00 09 04 00 00 09 04 81 7C 55 53 41 00 55 6E 69    ........|USA.Uni
74 65 64 20 53 74 61 74 65 73 00                   ted States.

And again the version byte is the DWord right after the Client ID, in this case it was 0xC9

also the version byte is sent to bnet from the client in the 0x22 joingame packet.
as long as u have the client to download the new patch and logon it, then u can always obtain the new version byte first hand.

Hope this helps!

Ringo.

R.a.B.B.i.T

Quote from: Maddox on January 05, 2005, 12:51 AM
Quote from: R.a.B.B.i.T on January 04, 2005, 09:05 PM
I've noticed that the Starcraft/Brood War bytes are jumping by 2 (IE: 0xc5 -> 0xc7 -> 0xc9).  Anyone know why that is?

1.10b, 1.11b, etc?
Thanks, I completely forgot about patch revisions.