private static void HandleLogonProof(IAuthClient client, IncomingAuthPacket packet)
        {
            client.Authenticator.SRP.PublicEphemeralValueA = packet.ReadBigInteger(32);
            BigInteger proof = packet.ReadBigInteger(20);

            SendLogonProofReply(client);
        }
Exemple #2
0
        public override async Task OnReceive(byte[] buffer)
        {
            var packet = new IncomingAuthPacket(buffer, buffer.Length);

            Console.WriteLine("Received: {0}", packet.PacketId.ToString());

            AuthenticationHandler.ProcessPacket(this, packet);
        }
        private static void HandleLogonChallenge(IAuthClient client, IncomingAuthPacket packet)
        {
            packet.Position = 33;
            var username = packet.ReadPascalString();
            var passHash = SecureRemotePassword.GenerateCredentialsHash(username, "CHANGEME");

            client.Authenticator = new Authenticator(new SecureRemotePassword(username, passHash, true));

            SendLogonChallengeReply(client);
        }
        public static void ProcessPacket(IAuthClient client, IncomingAuthPacket packet)
        {
            var packetId = packet.PacketId;
            Action <IAuthClient, IncomingAuthPacket> methodHandler;

            authActions.TryGetValue(packetId, out methodHandler);

            if (methodHandler != null)
            {
                methodHandler.Invoke(client, packet);
            }
            else
            {
                Console.WriteLine("Unknown packet :(");
            }
        }
 private static void HandleRealmList(IAuthClient client, IncomingAuthPacket packet)
 {
     LoadRealmList(client);
 }