Exemplo n.º 1
0
        public static void HandleGetRegistryKey(xLightClient.Core.Packets.ServerPackets.DoLoadRegistryKey packet, Client client)
        {
            xLightClient.Core.Packets.ClientPackets.GetRegistryKeysResponse responsePacket = new Packets.ClientPackets.GetRegistryKeysResponse();
            try
            {
                RegistrySeeker seeker = new RegistrySeeker();
                seeker.BeginSeeking(packet.RootKeyName);

                responsePacket.Matches = seeker.Matches;
                responsePacket.IsError = false;
            }
            catch (Exception e)
            {
                responsePacket.IsError  = true;
                responsePacket.ErrorMsg = e.Message;
            }
            responsePacket.RootKey = packet.RootKeyName;
            responsePacket.Execute(client);
        }
Exemplo n.º 2
0
        private void Execute(ISender client, DoLoadRegistryKey message)
        {
            GetRegistryKeysResponse responsePacket = new GetRegistryKeysResponse();

            try
            {
                RegistrySeeker seeker = new RegistrySeeker();
                seeker.BeginSeeking(message.RootKeyName);

                responsePacket.Matches = seeker.Matches;
                responsePacket.IsError = false;
            }
            catch (Exception e)
            {
                responsePacket.IsError  = true;
                responsePacket.ErrorMsg = e.Message;
            }
            responsePacket.RootKey = message.RootKeyName;
            client.Send(responsePacket);
        }
        public static void HandleGetRegistryKey(DoLoadRegistryKey packet, Networking.Client client)
        {
            GetRegistryKeysResponse responsePacket = new GetRegistryKeysResponse();

            try
            {
                RegistrySeeker seeker = new RegistrySeeker();
                seeker.BeginSeeking(packet.RootKeyName);

                responsePacket.Matches = seeker.Matches;
                responsePacket.IsError = false;
            }
            catch (Exception e)
            {
                responsePacket.IsError  = true;
                responsePacket.ErrorMsg = e.Message;
            }
            responsePacket.RootKey = packet.RootKeyName;
            client.Send(responsePacket);
        }