Valhalla Legends Forums Archive | Battle.net Bot Development | [C#] Gobbling up D2GS packets

AuthorMessageTime
Insolence
http://pastebin.com/m55fd37e4

With a little help from Shadow, I think I'm off to a good start, but the 0x01 packet seems to be throwing me off.

I receive {0xAF, 0x01} just fine, but when I get 0x01... it seems to be compressed?--I thought packets weren't compressed until I was actually in game?  So I commented out the 0x00, 0x01, and 0x02 special cases I had before entering the game, and it still doesn't produce the 0x01 packet.

Am I doing anything blatantly wrong in my decompressing?  If it looks like my logic is right, I'll pastebin the decompression class I'm using.

Thanks for reading :)
December 28, 2007, 1:47 AM
l2k-Shadow
if you don't decompress the packets before entering game, the first bytes of the relevant packets should be 0xAF, 0x02, and 0x07 in that order.
December 28, 2007, 2:20 AM
Insolence
[quote author=l2k-Shadow link=topic=17240.msg175532#msg175532 date=1198808449]
if you don't decompress the packets before entering game, the first bytes of the relevant packets should be 0xAF, 0x02, and 0x07 in that order.
[/quote]Well, I don't want to skip any packets--this is what I get:
[code]RC: 0x04 JoinGameRequest; RequestID: 2; Name: GMWACHWYBWBQ; Password: GMW
RC: 20  04 02 00 47 4d 57 41 43 48 57 59 42 57 42 51 00 47 4d 57 00
RS: 0x04 JoinGameResponse; RequestID: 2; GameToken: 984; GameServerIP: 63.240.202.37; GameHash: 608503059; Result: Success; Unknown: 0
RS: 19  04 02 00 d8 03 00 00 3f f0 ca 25 13 05 45 24 00 00 00 00
GS: 0xAF RequestLogonInfo; ProtocolVersion: 1
GS: 2    af 01
GC: 0x68 GameLogonRequest; Version: 11; Class: Sorceress; Name: TehMferzz; D2GShash: 608503059; D2GSToken: 984; Unknown12: 50 cc 5d ed b6 19 a5 91 00
GC: 37  68 13 05 45 24 d8 03 01 0b 00 00 00 50 cc 5d ed b6 19 a5 91 00 54 65 68 4d 66 65 72 7a 7a 00 6f 4b 00 00 00 00
GS: 0x01 GameLogonReceipt; Difficulty: Normal; Hardcore: False; Expansion: True; Ladder: True; Unknown2: 4
GS: 8    01 00 04 00 30 00 01 01
GS: 0x00 GameLoading;
GS: 1    00
GS: 0x02 GameLogonSuccess;
GS: 1    02
[/code]

I get AF 01 just fine, but 0x01 just isn't going through--how would I even go about skipping it?  When I receive AF 01, just skip the next 8 bytes--if it's even 8?
December 28, 2007, 2:27 AM
l2k-Shadow
what are you talking about? you don't need to parse that packet... don't even put it inside your debuffer lol.
December 28, 2007, 3:26 AM
Insolence
[quote author=l2k-Shadow link=topic=17240.msg175534#msg175534 date=1198812411]
what are you talking about? you don't need to parse that packet... don't even put it inside your debuffer lol.
[/quote]I do need to parse it, because it's coming out like this (Right now):
(in base 10)
5, 122, 9, 46, 239, 2, 92

Not sure what's missing in that, or if that's multiple packets--but after 0xAF that's what I get.
December 28, 2007, 3:58 AM
Insolence
Some tweaking and it magically works, thanks for the replies shadow :)
December 28, 2007, 9:03 PM

Search