/// <summary> /// Sends an authentication proof success reply to the client. /// </summary> /// <param name="client">the client</param> public static void SendAuthProofSuccessReply(IAuthClient client) { using (var packet = new AuthPacketOut(AuthServerOpCode.AUTH_LOGON_PROOF)) { packet.Write((byte)AccountStatus.Success); client.Authenticator.WriteServerProof(packet); packet.WriteInt(0); packet.WriteInt(0); packet.WriteShort(0); client.Send(packet); } }
/// <summary> /// Sends an authentication challenge success reply to the client. /// </summary> /// <param name="client">the client</param> public static void SendAuthChallengeSuccessReply(IAuthClient client) { using (var packet = new AuthPacketOut(AuthServerOpCode.AUTH_LOGON_CHALLENGE)) { packet.Write((byte)AccountStatus.Success); // Grunt command packet.Write((byte)0x00); client.Authenticator.WriteServerChallenge(packet); var rand = new BigInteger(new Random(Environment.TickCount), 128); packet.WriteBigInt(rand, 16); byte securityFlag = 0x0; packet.Write(securityFlag); // Require PIN input if ((securityFlag & 0x1) == 0x1) { packet.WriteInt(0); packet.Write(new byte[16]); } if ((securityFlag & 0x2) == 0x2) { packet.Write((byte)0); packet.Write((byte)0); packet.Write((byte)0); packet.Write((byte)0); packet.WriteULong(0); } // Require Security Token input if ((securityFlag & 0x4) == 0x4) { packet.Write((byte)1); } client.Send(packet); } }
/// <summary> /// Sends an authentication proof success reply to the client. /// </summary> /// <param name="client">the client</param> public static void SendAuthProofSuccessReply(IAuthClient client) { using (var packet = new AuthPacketOut(AuthServerOpCode.AUTH_LOGON_PROOF)) { packet.Write((byte)AccountStatus.Success); client.Authenticator.WriteServerProof(packet); packet.WriteInt(0); packet.WriteInt(0); packet.WriteShort(0); client.Send(packet); } }
/// <summary> /// Sends an authentication challenge success reply to the client. /// </summary> /// <param name="client">the client</param> public static void SendAuthChallengeSuccessReply(IAuthClient client) { using (var packet = new AuthPacketOut(AuthServerOpCode.AUTH_LOGON_CHALLENGE)) { packet.Write((byte) AccountStatus.Success); // Grunt command packet.Write((byte) 0x00); client.Authenticator.WriteServerChallenge(packet); var rand = new BigInteger(new Random(Environment.TickCount), 128); packet.WriteBigInt(rand, 16); byte securityFlag = 0x0; packet.Write(securityFlag); // Require PIN input if ((securityFlag & 0x1) == 0x1) { packet.WriteInt(0); packet.Write(new byte[16]); } if ((securityFlag & 0x2) == 0x2) { packet.Write((byte) 0); packet.Write((byte) 0); packet.Write((byte) 0); packet.Write((byte) 0); packet.WriteULong(0); } // Require Security Token input if ((securityFlag & 0x4) == 0x4) { packet.Write((byte) 1); } client.Send(packet); } }