• Welcome to Valhalla Legends Archive.
 
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Tuck

#1
Actually i just played around with these packets (still learning) but i got help from a friend :)
#2
Second response when sent join game to host:
Can't find info for split 1 and 3 :/

            //Received Packet Length: 143 (Splits to 3 packets)

                //0000  f7 06 33 00 01 00 00 00 01 47 48 4c 2d 42 6f 74  ÷.3......GHL-Bot
                //0010  00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
                //0020  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
                //0030  00 00 00                                         ...             
                //Unknown #?!

                //               f7 3d 3d 00 01 00 00 00 4d 61 70 73 5c     ÷==.....Maps\
                //0040  28 32 29 42 6f 6f 74 79 42 61 79 2e 77 33 6d 00  (2)BootyBay.w3m.
                //0050  d1 e7 01 00 00 5a ef d8 13 8f e7 6e 76 e3 3a 25  Ñç...ZïØ..çnvã:%
                //0060  fc 80 5c 43 76 38 53 93 41 d0 72 ac cb 3f 77 20  ü.\Cv8S.AÐr¬Ë?w
                //(BYTE)   f7       |W3GS Signature
                //(BYTE)   3d       |Packet Signature
                //(WORD)   2d00     |Packet Size
                //(DWORD)  01000000 |Always 0x00000001?
                //(char[]) 4d6170735c28322948696c6c734f66476c6f72792e77336d00
                //                  |Map path (null terminated)
                //(DWORD)  36750100 |File size
                //(DWORD)  49caebd1 |Unknow DWORD
                //(DWORD)  2792eb36 |Map file CRC32             

                //0070  f7 09 1f 00 19 00 02 01 64 02 00 00 00 60 01 64  ÷.......d....`.d
                //0080  02 ff 02 00 01 01 60 01 64 ab df 53 01 00 02     .ÿ....`.d«ßS...
                //Unknown #?!
#3
Quote from: MyndFyre on September 08, 2009, 03:04 PM
You'll have to do some digging in my source code to understand what those pieces mean, but I can give you some insight.

BattleNetClient ultimately inherits from ConnectionBase.  It has a couple overloads of Receive, and the one you're looking at is Receive(byte[], int, int).  This method blocks until the specified length bytes have been read into the byte array and will not return until that condition has been completed (it may throw an exception if the connection becomes disconnected or something like that).  The documentation for something like NetworkStream indicates that the Read method returns an integer, specifying how many bytes were read, and that the value may not always be what was requested.  So, you might call Read(header, 0, 4) and get only one byte read into the buffer, in the event of high network latency, for example.

The BufferLength property is analogous to bytes.Length, but in this case, it's because I queue up free byte arrays to avoid memory fragmentation.  If a packet Battle.net sends is longer than what I usually queue, I simply create an extra byte[] buffer.

I'm sorry, I still don't understand what you're asking about the logon sequence.

I will do my best but I've never coded anything in C# but it looks similar to python witch I've played around with making plugins for games :P (Coding this in vb.net)

the login sequence show send that DWORD there then you receive another DWORD and blah blah like where is all stuff like product, country, login, cdkey :/


Edit: I've found Ringo's vb6 source codes so i don't think i would need more help when i can read the lines so easy now :P but thanks MyndFyre for the basics :)
#4
Quote from: MyndFyre on September 08, 2009, 10:23 AM
The site isn't currently coming up for me so I can't comment about what it says.  However, I'm not quite sure what you're asking either.

Starcraft/Broodwar/Diablo II/Lord of Destruction (X-Sha-1)

SEND -> SID_AUTH_INFO (0x50)
RECV <- SID_AUTH_CHECK (0x51)
RECV <- SID_LOGONRESPONSE (0x29)
RECV <- SID_UDPPINGRESPONSE (0x14) [SEXP/STAR/W2BN]
SEND -> SID_ENTERCHAT (0x0A)


And Thanks a lot for replying to my other questions i will be looking at the links and such when i get home :)

would the Stream.Read do the same as receive :/ I'm not 100%
{
    Stream.Read(Result, 0, (ushort)(Length - 4));
    Result = Receive(Data, 0, (ushort)(Length - 4));
}


if (length > BattleNetClientResources.IncomingBufferPool.BufferLength)
                            data = new byte[unchecked((ushort)length - 4)];
                        else
                            data = BattleNetClientResources.IncomingBufferPool.GetBuffer();

with BufferLength do you mean the Bytes.Length ? and if yes including 0 or counting from 1
#5
[RB] Packet Builder
[C#]Packet Buffer

If you don't want to help me, you don't have to. [If my grammar sucks to much let me know i'm not English :)]

I've searched for a hour now and only found these that doesn't quite answer my question, only made me a bit confused that i got more questions.

Question 1: Do i need BNLS/Hashes to make packets to send?

Question 2: Could anyone show me an example of what they do when they receive bytes from B.Net

Question 3: I'm pretty sure i saw something that if the byte array length equals to a x value it means something but i can't seem to find the topic again.

Question 4: LOGON SEQUENCES for Diablo II shows i would need to send Single DWORD's, also says some how it have to contain the login information, as i don't see how that works :/