• Welcome to Valhalla Legends Archive.
 

Diablo II Game Server Logon Sequence

Started by Spilled, December 10, 2005, 02:54 AM

Previous topic - Next topic

Spilled

I Guess I'm a little confused on the sequence to the Game Server. I was told:
Quote
C > S Connect()
S > C Accept()
S > C 0xAF (Compressed)  --  AF 01
C > S 0x68 (Login Data)
C > S 0x6D (Optional ping at this stage)
S > C 0x01
S > C 0x00
If Failed: S > C 0xB3
If Passed: S > C 0x02
C > S 0x6B
S > C Game Data


But....
http://bnetdocs.valhallalegends.com/content.php?Section=d&id=20

Is showing me Different. On top of that After i Send 0x68 when I Recieve 0xAF. I get a response of 0x01 from the Game Server, Is there any documentation on this anywhere that you could link me to? Thank everyone!

Ringo

#1
Hmm, yeah your probly better off doing it like it says on bnet docs:

Private Sub sckD2GS_DataArrival(ByVal bytesTotal As Long)
    On Error Resume Next
    Dim Data As String
    sckD2GS.GetData Data, vbString
    If Data = Chr(&HAF) & Chr(1) Then
        'C > S 0x68
        'C > S 0x6D
    ElseIf Data = Chr(2) & Chr(&H5C) Then
        'C > S 0x6B
    Else
        'DoData data
    End If
End Sub

Its also kinda documented here close to the top of the post.

And im not sure what 0x01 really is, but it can be ignored (its probly infomation about the game type, like hc/sc etc)

Spilled

Hrmm. Now that I have follow the sequence. When I Send 0x6A to the Game Server, It disconnects me.,

My sequence is like so:

Connect to Game Server.
S - C 0xAF
C - S 0x68
C - S 0x6D
S - C 0x5C
C - S 0x6A

When I Send 0x6A, I am Disconnected.,..

Heres a Packet Log:

5  Hide  Hide  2  Recv 
0000  AF 01                                              ..

6  Hide  Hide  50  Send 
0000  68 C7 97 01 11 27 03 04 0B 00 00 00 50 CC 5D ED    h....'......P.].
0010  B6 19 A5 91 00 53 70 69 6C 6C 65 64 2D 48 61 6D    .....Spilled-Ham
0020  6D 65 72 73 00 6D 2E 33 16 11 00 00 00 00 00 00    mers.m.3........
0030  00 00                                              ..

7  Hide  Hide  10  Recv 
0000  0A 7A 09 A5 F1 F7 FF FF FF FC                      .z........

8  Hide  Hide  2  Recv 
0000  02 5C                                              .\

9  Hide  Hide  1  Send 
0000  6A   


0x6D Is combining with 0x68, Could that be it? I know about the random Data at the end of 0x68 But my character name fills it so no random data is needed to be added.

Also what is:
7  Hide  Hide  10  Recv 
0000  0A 7A 09 A5 F1 F7 FF FF FF FC                      .z........

How should i responde to this packet? Is there any document u could link me to?

This should be sufficient ammount of Information to Pinpoint the Problem, If any more is needed just post back. Thanks in advance!

One-Way


Ringo

Quote from: Spilled[DW] on December 11, 2005, 12:44 AM
0x6D Is combining with 0x68, Could that be it? I know about the random Data at the end of 0x68 But my character name fills it so no random data is needed to be added.

Also what is:
7  Hide  Hide  10  Recv 
0000  0A 7A 09 A5 F1 F7 FF FF FF FC                      .z........

How should i responde to this packet? Is there any document u could link me to?
Like One-Way said, you need to send 0x6B rather than 0x6A, somthing that changed in 1.11, but i dont think krad fully updated bnet docs.

You also dont need to respond to 0A 7A 09 A5 F1 F7 FF FF FF FC
You should also decompress it, because the only 2 compressed messages to capture and respond to are AF 01 and 02 5C.
I think because 0x68 and 0x6D were stacked, it caused to server to do the same with the responce.
0x01 and 0x00 always come together, but that also has the 0x6D ping responce compressed into it as well:

01 00 04 00 10 00 01 00                              ........

00                                                   .

8F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00      ?...............
00 00 00 00 00 00 00 00 00 00 00                     ...........

All 3 of them messages can safely be ignored, so you dont need to respond to them at all.

Spilled

Hrmm, But i keep getting disconnected fromt he game server after in game about 1 minute at the most when i send 0x6D every 5 seconds. Any ideas?

dxoigmn

Quote from: Spilled[DW] on December 11, 2005, 04:10 PM
Hrmm, But i keep getting disconnected fromt he game server after in game about 1 minute at the most when i send 0x6D every 5 seconds. Any ideas?

Is warden activated? If it is and you're not responding to it, then you'll be kicked out.

teK

I'm having the same problem with my bot, keep getting disconnected after 30s. Has anyone figured out how to decode the warden packet or has got any information on packet 0x66?

Thanks.

l2k-Shadow

Quote from: Spilled[DW] on December 11, 2005, 04:10 PM
Hrmm, But i keep getting disconnected fromt he game server after in game about 1 minute at the most when i send 0x6D every 5 seconds. Any ideas?

I told you this would happen on AIM like three times... I love it when people just don't listen
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

Ringo

Quote from: teK on December 11, 2005, 05:07 PM
I'm having the same problem with my bot, keep getting disconnected after 30s. Has anyone figured out how to decode the warden packet or has got any information on packet 0x66?

Thanks.
All i know is, that if you send 2 0x66 packets, both with a 1 byte payload of 0x01, the server will send you the 1st chunk of the warden module.
Then if you send another 2 with 0x01, the server sends you the next chunk.
But that still doesnt stop you from droping :(

Spilled

Quote from: dxoigmn on December 11, 2005, 04:18 PM
Quote from: Spilled[DW] on December 11, 2005, 04:10 PM
Hrmm, But i keep getting disconnected fromt he game server after in game about 1 minute at the most when i send 0x6D every 5 seconds. Any ideas?

Is warden activated? If it is and you're not responding to it, then you'll be kicked out.

Hrmm, Do you have any information on Warden? Cuz if so, we would like to hear it since no body has gotten past it. Personally im Interested in doing some research on this and how i would get past the check.