• Welcome to Valhalla Legends Archive.
 

C/C++ login data parse and manupulate

Started by tinman, April 09, 2006, 06:10 AM

Previous topic - Next topic

tinman

i wish to manupulate the  0x50 c->s (and 0x51 c->s  ?? ) to change the version info and exehash send by warcraft 3
how to parse the the packets send by warcraft3 and manupulate it (in C/C++) ?

P/S: i'm new to bnet binary bot development.

TheMinistered

Yes, you sound new and we can tell... you can't exactly 'change' the exeinfo/version/etc without battle.net rejecting.   If you want to know how to properly build/send 0x50/0x51 then look around on these forums because there is byfar plenty of info on it, or wait for someone on the forums who feels like walking you thorugh it.

tinman

hmm.. let's make it simple.

actually i still dont understand how to read bnet binary messages

for what i understood for SID_AUTH_CHECK


0xFFFFFFFF 0x51           <---- Message Header For 0x51
0x8E 0x00                     <---- Message Length? Is it taken two bytes, a WORD?
0xD2 0xAA 0x3B 0x00   <---- Client Token? DWORD = 4 bytes?
0xA8 0x14 0x00 0x01   <---- EXE Version? DWORD = 4 bytes?
0x00 0x01 0xA9 0xF3   <---- EXE Hash? DWORD = 4 bytes?
0xF4 0xB4 0x02 0x00   <---- Number of keys in this packet...(now seems a bit illogical =.=)

For Each Key:       
(DWORD) Key Length
(DWORD) CD key's product value
(DWORD) CD key's public value
(DWORD) Unknown (0)
(DWORD[5]) Hashed Key Data

(STRING) Exe Information
(STRING) CD Key owner name


please guide me to parse whole message till the cdkey owner.

Kp

Arta's BnetDocs project has all the information you need for dissecting this packet.  What're you trying to accomplish?
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

warz

Quote from: tinman on April 09, 2006, 10:45 AM
hmm.. let's make it simple.

actually i still dont understand how to read bnet binary messages

for what i understood for SID_AUTH_CHECK


0xFFFFFFFF 0x51           <---- Message Header For 0x51
0x8E 0x00                     <---- Message Length? Is it taken two bytes, a WORD?
0xD2 0xAA 0x3B 0x00   <---- Client Token? DWORD = 4 bytes?
0xA8 0x14 0x00 0x01   <---- EXE Version? DWORD = 4 bytes?
0x00 0x01 0xA9 0xF3   <---- EXE Hash? DWORD = 4 bytes?
0xF4 0xB4 0x02 0x00   <---- Number of keys in this packet...(now seems a bit illogical =.=)

For Each Key:       
(DWORD) Key Length
(DWORD) CD key's product value
(DWORD) CD key's public value
(DWORD) Unknown (0)
(DWORD[5]) Hashed Key Data

(STRING) Exe Information
(STRING) CD Key owner name


please guide me to parse whole message till the cdkey owner.

No, you're forgetting to let the server know whether or not you're using a spawn client, or not. The boolean value for this is inserted right before the key data, right after number of keys in the packet is inserted. Like Kp said, bnet docs will tell you all of this information. If you're looking for explanations on how to handle these packets from a coding point of view, then ask that.

tinman

oh yes...
i'm looking for explanations for coding point of view...
i'm actually writting a proxy that can redirect the users to suitable gateways that matched their versions.

MyndFyre

Quote from: tinman on April 09, 2006, 11:55 PM
oh yes...
i'm looking for explanations for coding point of view...
i'm actually writting a proxy that can redirect the users to suitable gateways that matched their versions.
You'd need to do this in response to the product ID and version byte of the client as specified in SID_AUTH_INFO; unfortunately, you'll only get granularity of major revisions, as minor revisions (such as 1.12 to 1.12b) do not change in the version byte.

You would need to do this because the server values in SID_AUTH_INFO are dynamic, and the server gateway that the client is actually connecting to would need to provide this data to the client.
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.

tinman

#7
thx for the info.