Beispiel #1
0
        static public void HandlePacket(BaseClient client, PacketIn packet)
        {
            LobbyClient cclient = client as LobbyClient;

            byte[] PublicKey = new byte[64];
            for (int i = 0; i < 64; ++i)
            {
                PublicKey[i] = packet.GetUint8();
            }
            Reverse(PublicKey, 64);
            cclient.A = PublicKey;

            UInt16 unk = packet.GetUint16();

            byte[] Proof = new byte[20];
            for (int i = 0; i < 20; ++i)
            {
                Proof[i] = packet.GetUint8();
            }
            Reverse(Proof, 20);
            cclient.Proof = Proof;

            if (IsValid(cclient))
            {
                ANS_LOGIN_SUCCES.Send(cclient);
            }
            else
            {
                cclient.Disconnect();
            }
        }