示例#1
0
        private bool CheckClient(out string clientHash)
        {
            if (!File.Exists(server.ClientExe))
            {
                throw new Exception("Client executable not found.");
            }

            try {
                clientHash = MD5.ComputeHash(server.ClientExe);

                ClientList clientList = new ClientList();
                clientList.Path = Path.Combine(Constants.PhoenixDir, ClientList.Filename);
                clientList.Load();

                ClientInfo clientInfo = clientList.FindClient(clientHash);
                if (clientInfo.Hash != null && clientInfo.Key1 != null && clientInfo.Key2 != null)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception e) {
                throw new Exception(Resources.Launcher_ErrorCalculatingMD5, e);
            }
        }
示例#2
0
        public bool Load()
        {
            ClientList list = new ClientList();

            list.Path = System.IO.Path.Combine(Core.LaunchData.PhoenixDir, ClientList.Filename);
            list.Load();
            ClientInfo = list.FindClient(Core.LaunchData.ClientHash);

            if (Calculated)
            {
                Trace.WriteLine("Clients keys found.", "Phoenix");
                return(true);
            }
            else
            {
                Trace.WriteLine("Clients keys not found.", "Phoenix");
                return(false);
            }
        }