Пример #1
0
        public static LoginPacket Parse(NetworkMessage message)
        {
            LoginPacket packet = new LoginPacket();

            packet.Os      = message.GetUInt16(); // OS
            packet.Version = message.GetUInt16(); // version

            message.RSADecrypt();

            message.GetByte(); // should be zero

            packet.XteaKey    = new uint[4];
            packet.XteaKey[0] = message.GetUInt32();
            packet.XteaKey[1] = message.GetUInt32();
            packet.XteaKey[2] = message.GetUInt32();
            packet.XteaKey[3] = message.GetUInt32();

            packet.GmMode        = message.GetByte();
            packet.AccountName   = message.GetString();
            packet.CharacterName = message.GetString();
            packet.Password      = message.GetString();

            message.SkipBytes(6); // 841 specific (according to OT)

            return(packet);
        }
Пример #2
0
        public static AccountPacket Parse(NetworkMessage message)
        {
            AccountPacket packet = new AccountPacket();

            packet.Os      = message.GetUInt16(); // OS
            packet.Version = message.GetUInt16(); // version

            // File checks
            message.GetUInt32();
            message.GetUInt32();
            message.GetUInt32();

            message.RSADecrypt();

            message.GetByte(); // should be zero

            packet.XteaKey    = new uint[4];
            packet.XteaKey[0] = message.GetUInt32();
            packet.XteaKey[1] = message.GetUInt32();
            packet.XteaKey[2] = message.GetUInt32();
            packet.XteaKey[3] = message.GetUInt32();

            packet.AccountName = message.GetString(); // account name
            packet.Password    = message.GetString(); // password

            return(packet);
        }
Пример #3
0
        public static LoginPacket Parse(NetworkMessage message)
        {
            LoginPacket packet = new LoginPacket();
            packet.Os = message.GetUInt16(); // OS
            packet.Version = message.GetUInt16(); // version

            message.RSADecrypt();

            message.GetByte(); // should be zero

            packet.XteaKey = new uint[4];
            packet.XteaKey[0] = message.GetUInt32();
            packet.XteaKey[1] = message.GetUInt32();
            packet.XteaKey[2] = message.GetUInt32();
            packet.XteaKey[3] = message.GetUInt32();

            packet.GmMode = message.GetByte();
            packet.AccountName = message.GetString();
            packet.CharacterName = message.GetString();
            packet.Password = message.GetString();

            message.SkipBytes(6); // 841 specific (according to OT)

            return packet;
        }