alejzeis / JRakLibPlus

An enhanced port of PHP RakLib, based on JRakLib
GNU Lesser General Public License v3.0
10 stars 5 forks source link

Lack of documentation #6

Open null321-jared opened 8 years ago

null321-jared commented 8 years ago

On the readme it says "Instructions on how to use the library can be found on the wiki". The wiki is completely empty.

I am very new to RakLib, so I started using this after making very slow progress doing it myself, but I am having trouble interpreting the data that my program gets sent to my Hook.PACKET_RECIEVED HookRunnable. I cannot find a way to match it with any of the MinecraftPE protocol data I have found so far online. I have tried matching the incoming payload up with https://github.com/NiclasOlofsson/MiNET/blob/master/src/MiNET/MiNET/Net/MCPE%20Protocol%20Documentation.md and http://wiki.vg/Pocket_Minecraft_Protocol

I'm trying to get to the stage where I can get the packet ID and use that to decode it using the correct class.

alejzeis commented 8 years ago

Sorry about the documentation. What is the first byte of the data?

On Oct 10, 2016 1:05 PM, "lizardfreak321" notifications@github.com wrote:

On the readme it says "Instructions on how to use the library can be found on the wiki". The wiki is completely empty.

I am very new to RakLib, so I started using this after making very slow progress doing it myself, but I am having trouble interpreting the data that my program gets sent to my Hook.PACKET_RECIEVED HookRunnable. I cannot find a way to match it with any of the MinecraftPE protocol data I have found so far online. I have tried matching the incoming payload up with https://github.com/ NiclasOlofsson/MiNET/blob/master/src/MiNET/MiNET/Net/MCPE%20Protocol% 20Documentation.md and http://wiki.vg/Pocket_Minecraft_Protocol

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jython234/JRakLibPlus/issues/6, or mute the thread https://github.com/notifications/unsubscribe-auth/AFtT5uBpfSPhx3cyMeHSWtvz2l5ytHyxks5qyn56gaJpZM4KS1fH .

null321-jared commented 8 years ago

Thank you for the response!

Here is the first byte of every packet the hook gets sent on a basic login: 5 [RakNetServer] INFO JRakLibPlus Server - RakNetServer bound to /0.0.0.0:19132, running on RakNet protocol 7 7999 [RakNetServer] DEBUG JRakLibPlus Server - Session opened from /10.1.10.23 Buffer length: 1404 Unknown packet: 125 (0x7D) Buffer length: 1404 Unknown packet: 85 (0x55) Buffer length: 1404 Unknown packet: 143 (0x8F) Buffer length: 4509 Unknown packet: 125 (0x7D) Buffer length: 297 Unknown packet: 117 (0x75) Buffer length: 1404 Unknown packet: 125 (0x7D) Buffer length: 1404 Unknown packet: 143 (0x8F) 11066 [RakNetServer] DEBUG JRakLibPlus Server - Client latency is 31ms 29944 [RakNetServer] DEBUG JRakLibPlus Server - Session 10.1.10.23:19132 disconnected: client disconnected

And if it matters I am using Minecraft Windows 10 Edition to test it.

alejzeis commented 8 years ago

@lizardfreak321 I don't recognize any of the ids except for 0x8F, that should be the MCPE container packet. After 0x8F should be the Minecraft packet ID.

null321-jared commented 8 years ago

I forgot to revert a change resulting in the incorrect offset. Here is the corrected data showing the first three bytes: 5823 [RakNetServer] DEBUG JRakLibPlus Server - Session opened from /10.1.10.23 Packet bytes: 254 (0xFE) 6 (0x06) 0 (0x00) Packet bytes: 103 (0x67) 175 (0xAF) 93 (0x5D) Packet bytes: 90 (0x5A) 83 (0x53) 135 (0x87) Packet bytes: 254 (0xFE) 6 (0x06) 0 (0x00) Packet bytes: 58 (0x3A) 138 (0x8A) 65 (0x41) Packet bytes: 254 (0xFE) 6 (0x06) 0 (0x00) Packet bytes: 58 (0x3A) 138 (0x8A) 65 (0x41) 8886 [RakNetServer] DEBUG JRakLibPlus Server - Client latency is 34ms 11061 [RakNetServer] DEBUG JRakLibPlus Server - Session 10.1.10.23:19132 disconnected: timeout

alejzeis commented 8 years ago

0xFE is the container I think. What is the mcpe version?

On Oct 14, 2016 7:35 PM, "lizardfreak321" notifications@github.com wrote:

I forgot to revert a change resulting in the incorrect offset. Here is the corrected data showing the first three bytes: 5823 [RakNetServer] DEBUG JRakLibPlus Server - Session opened from / 10.1.10.23 Packet bytes: 254 (0xFE) 6 (0x06) 0 (0x00) Packet bytes: 103 (0x67) 175 (0xAF) 93 (0x5D) Packet bytes: 90 (0x5A) 83 (0x53) 135 (0x87) Packet bytes: 254 (0xFE) 6 (0x06) 0 (0x00) Packet bytes: 58 (0x3A) 138 (0x8A) 65 (0x41) Packet bytes: 254 (0xFE) 6 (0x06) 0 (0x00) Packet bytes: 58 (0x3A) 138 (0x8A) 65 (0x41) 8886 [RakNetServer] DEBUG JRakLibPlus Server - Client latency is 34ms 11061 [RakNetServer] DEBUG JRakLibPlus Server - Session 10.1.10.23:19132 disconnected: timeout

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jython234/JRakLibPlus/issues/6#issuecomment-253950150, or mute the thread https://github.com/notifications/unsubscribe-auth/AFtT5tlzQ6s7KYGizLRRqkibQ6JnIV7Iks5q0B-1gaJpZM4KS1fH .

null321-jared commented 8 years ago

It is v0.15.10