示例#1
0
        private void Make()
        {
            WithCsvWriter(writer =>
            {
                var userAssist = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist");
                writer.WriteHeader(typeof(SnapshotRecord));

                foreach (var guidKeyName in userAssist.GetSubKeyNames())
                {
                    var countKey = userAssist.OpenSubKey(guidKeyName).OpenSubKey("Count");
                    foreach (var valueName in countKey.GetValueNames())
                    {
                        var value = (byte[])countKey.GetValue(valueName);
                        writer.WriteRecord(new SnapshotRecord()
                        {
                            GUID        = guidKeyName,
                            ValueName   = ROT13.Toggle(valueName),
                            Value       = ToString(value),
                            ValueLength = value.Length
                        });
                    }
                }
            });
        }
示例#2
0
 public void TestROT()
 {
     Assert.AreEqual("pzq.rkr", ROT13.Toggle("cmd.exe"));
     Assert.AreEqual("cmd.exe", ROT13.Toggle("pzq.rkr"));
 }