Author | Message | Time |
---|---|---|
MindArchon | I am having troubles with D2GS packets. I'd be nice if you guys could help me out here. There are two issues I am having a problem with: Most importantly, how do you decompress the packets recieved. I've seen some source on how to do it, but I don't understand it. How are the packets compressed? And when you send packets back to the d2gs, do you have to compress them yourself? I have absolutely no idea how to start here. When I first connect to D2GS, do I send 0x68 immediantly after connecting, or after they send data to me? Do I have to send stuff before or after it to officially get into the game? | October 13, 2005, 3:35 AM |
l2k-Shadow | [quote author=MindArchon link=topic=13020.msg130855#msg130855 date=1129174536] Most importantly, how do you decompress the packets recieved. I've seen some source on how to do it, but I don't understand it. How are the packets compressed? And when you send packets back to the d2gs, do you have to compress them yourself? I have absolutely no idea how to start here. [/quote] Use Search button [quote author=MindArchon link=topic=13020.msg130855#msg130855 date=1129174536] When I first connect to D2GS, do I send 0x68 immediantly after connecting, or after they send data to me? Do I have to send stuff before or after it to officially get into the game?. [/quote] You send 0x68 when you receive 0xAF. | October 13, 2005, 4:12 AM |
MindArchon | Alright, I did a search and I guess I will use D2GS.dll. However, I have no idea how any of the parameters work. I found some stuff on the search, but all of it doesn't seem to work. This code that came with the zip containing D2GS doesn't work, and I cannot figure out how to use it effectively. [code]On Error Resume Next Dim offset As Long Dim Size As Long Dim a As Integer Dim H1 As String Dim H2 As Integer Dim outdata As String Dim maxsize As Long Dim outsize As Long a = 5 '<-- extra packet space (only tryed it in testing to try fix bad packet returns) 'D2GS_DATA = Data from server > H1 = GamePacketSize(D2GS_DATA, Size, offset) outdata = String(Size + (a + 1), vbNullChar) H2 = GamePacketDecode(Mid(D2GS_DATA, 1 + offset), Size + a, outdata, Size + a, outsize) 'outdata = decompressed data.[/code] Also, Ive sent 0x68, and recieved 0x7A and 0x5C. I then guessed I would send 0x6B, but it says I dropped due to timeout in-game. I have been sending 0x6D every 6-7 seconds. Here is the packet log of my data being sent: 0x68 [code]0000: 68 B9 44 67 38 62 00 01 0B 00 00 00 50 CC 5D ED h¹Dg8b....PÌ]í 0010: B6 19 A5 91 00 46 69 72 65 64 41 78 65 00 81 B3 ¶¥‘.FiredAxe.?³ 0020: 6F 4B 00 00 00 00 oK..............[/code] I recieve 0x7A and 0x5C, and send out 0x6B, and I drop due to timeout, and here is 0x6D I am sending every 6 seconds. [code]0000: 6D 12 E8 E9 2E 00 00 00 00 00 00 00 00 mèé............[/code] | October 14, 2005, 12:35 AM |
Infamous | The 2nd DWord in 0x6D isn't null. The first byte has a value. | October 14, 2005, 12:57 AM |
MindArchon | I thought it is empty. [code]0000: 6D 12 E8 E9 2E 00 00 00 00 00 00 00 00 mèé............[/code] 6D is the packet ID 12 E8 E9 2E is the long I send (get tick count) 00 00 00 00 00 00 00 00 are the 2 empty dwords | October 14, 2005, 1:06 AM |
LivedKrad | [quote author=MindArchon link=topic=13020.msg130935#msg130935 date=1129250157] Alright, I did a search and I guess I will use D2GS.dll. However, I have no idea how any of the parameters work. I found some stuff on the search, but all of it doesn't seem to work. This code that came with the zip containing D2GS doesn't work, and I cannot figure out how to use it effectively. [code]On Error Resume Next Dim offset As Long Dim Size As Long Dim a As Integer Dim H1 As String Dim H2 As Integer Dim outdata As String Dim maxsize As Long Dim outsize As Long a = 5 '<-- extra packet space (only tryed it in testing to try fix bad packet returns) 'D2GS_DATA = Data from server > H1 = GamePacketSize(D2GS_DATA, Size, offset) outdata = String(Size + (a + 1), vbNullChar) H2 = GamePacketDecode(Mid(D2GS_DATA, 1 + offset), Size + a, outdata, Size + a, outsize) 'outdata = decompressed data.[/code] Also, Ive sent 0x68, and recieved 0x7A and 0x5C. I then guessed I would send 0x6B, but it says I dropped due to timeout in-game. I have been sending 0x6D every 6-7 seconds. Here is the packet log of my data being sent: 0x68 [code]0000: 68 B9 44 67 38 62 00 01 0B 00 00 00 50 CC 5D ED h¹Dg8b....PÌ]í 0010: B6 19 A5 91 00 46 69 72 65 64 41 78 65 00 81 B3 ¶¥‘.FiredAxe.?³ 0020: 6F 4B 00 00 00 00 oK..............[/code] I recieve 0x7A and 0x5C, and send out 0x6B, and I drop due to timeout, and here is 0x6D I am sending every 6 seconds. [code]0000: 6D 12 E8 E9 2E 00 00 00 00 00 00 00 00 mèé............[/code] [/quote] You're dropping out of the game for failed responses to Warden. (That it would seem you're not even receiving due to not sending 0x66 at game startup). | October 14, 2005, 1:20 AM |
MindArchon | Ugh. So I assume I send 0x66 right when I connect to the server and it replies with 0xAE? Do you have any idea where I can find the format for 0x66? Nobody seems to know for sure. Do I have to do anything with 0xAE? (is 0xAF 0xAE compressed or something? Because I still dont have decompression down) | October 14, 2005, 1:46 AM |
LivedKrad | [quote]So I assume I send 0x66 right when I connect to the server and it replies with 0xAE? Do you have any idea where I can find the format for 0x66? Nobody seems to know for sure[/quote] No public documentation exists that I know of. [quote]Do I have to do anything with 0xAE? (is 0xAF 0xAE compressed or something? Because I still dont have decompression down)[/quote] No, 0xAE is not 0xAF compressed. 0xAE is a packet used to update Warden anti-hack code and helps Diablo root out unwanted libraries uses within Diablo's memory space. | October 14, 2005, 3:51 AM |
Infamous | Try this website, it has some information on 0x66 and 0xAE. http://realmgx.com/phpBB2/viewtopic.php?t=3898 | October 14, 2005, 7:25 PM |