From 9b09ff40428541d0e212c8fe56c4974d67741f66 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Thu, 3 Jan 2013 12:20:28 +0100 Subject: [PATCH] Added 0x03 unknown packet --- src/classes/CustomPacketHandler.class.php | 16 ++++++++++++++++ src/pstruct/protocol.php | 2 ++ 2 files changed, 18 insertions(+) diff --git a/src/classes/CustomPacketHandler.class.php b/src/classes/CustomPacketHandler.class.php index 9332a946e..6c880b15e 100644 --- a/src/classes/CustomPacketHandler.class.php +++ b/src/classes/CustomPacketHandler.class.php @@ -56,6 +56,15 @@ class CustomPacketHandler{ $this->raw .= Utils::writeLong($this->data["payload"]); } break; + case 0x03: + if($this->c === false){ + $this->data["unknown1"] = Utils::readLong($this->get(8)); + $this->data["unknown2"] = Utils::readLong($this->get(8)); + }else{ + $this->raw .= Utils::writeLong($this->data["unknown1"]); + $this->raw .= Utils::writeLong($this->data["unknown2"]); + } + break; case MC_CLIENT_CONNECT: if($this->c === false){ $this->data["clientID"] = Utils::readLong($this->get(8)); @@ -509,6 +518,13 @@ class CustomPacketHandler{ $this->raw .= $this->data["unknown2"]; } break; + default: + if($this->c === false){ + console("[DEBUG] Received unknown Data Packet ID 0x".dechex($pid), true, true, 2); + }else{ + console("[DEBUG] Sent unknown Data Packet ID 0x".dechex($pid), true, true, 2); + } + break; } } diff --git a/src/pstruct/protocol.php b/src/pstruct/protocol.php index 3f06258db..cd03aaa24 100644 --- a/src/pstruct/protocol.php +++ b/src/pstruct/protocol.php @@ -28,6 +28,8 @@ the Free Software Foundation, either version 3 of the License, or //Protocol Version: 5 +define("MC_KEEP_ALIVE", 0x00); + define("MC_KEEP_ALIVE", 0x00); define("MC_CLIENT_CONNECT", 0x09);