Пример #1
0
        public static HookingSettings FromXml(Stream stream)
        {
            var hookingSettings = new HookingSettings();

            using (var reader = new XmlTextReader(stream))
            {
                reader.WhitespaceHandling = WhitespaceHandling.None;
                reader.ReadStartElement("HookingSettings");

                while (!reader.EOF)
                {
                    if (reader.NodeType != XmlNodeType.Element)
                    {
                        reader.Read();
                        continue;
                    }

                    var processName  = reader.GetAttribute("processName");
                    var moduleName   = reader.GetAttribute("moduleName");
                    var functionName = reader.GetAttribute("functionName");
                    hookingSettings.Add(processName, moduleName, functionName);
                    reader.ReadStartElement("HookingRule");
                }
            }

            return(hookingSettings);
        }
Пример #2
0
        public static HookingSettings With(string aProcessName, string aModuleName, string aFunctionName)
        {
            var hookingSettings = new HookingSettings();
            hookingSettings.Add(aProcessName, aModuleName, aFunctionName);

            return hookingSettings;
        }
Пример #3
0
 public ApplicationPresenter(IApplicationView aView, ISpyManager aSpyManager, HookingSettings hookingSettings, int platformBits)
 {
     _processModulesDisplayer = new ProcessModulesDisplayer(this, aView);
     _hookingSettings = hookingSettings;
     _platformBits = platformBits;
     InitializePresenter(aView, aSpyManager);
     InitializeView();
 }
Пример #4
0
        public static HookingSettings With(string aProcessName, string aModuleName, string aFunctionName)
        {
            var hookingSettings = new HookingSettings();

            hookingSettings.Add(aProcessName, aModuleName, aFunctionName);

            return(hookingSettings);
        }
Пример #5
0
 public bool Equals(HookingSettings other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(_hookingRules.SetEquals(other._hookingRules));
 }
Пример #6
0
 public bool Equals(HookingSettings other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return _hookingRules.SetEquals(other._hookingRules);
 }
Пример #7
0
        public static HookingSettings FromXml(Stream stream)
        {
            var hookingSettings = new HookingSettings();

            using (var reader = new XmlTextReader(stream))
            {
                reader.WhitespaceHandling = WhitespaceHandling.None;
                reader.ReadStartElement("HookingSettings");

                while (!reader.EOF)
                {
                    if (reader.NodeType != XmlNodeType.Element)
                    {
                        reader.Read();
                        continue;
                    }

                    var processName = reader.GetAttribute("processName");
                    var moduleName = reader.GetAttribute("moduleName");
                    var functionName = reader.GetAttribute("functionName");
                    hookingSettings.Add(processName, moduleName, functionName);
                    reader.ReadStartElement("HookingRule");
                }
            }

            return hookingSettings;
        }
Пример #8
0
 public void AddRulesFrom(HookingSettings other)
 {
     _hookingRules.UnionWith(other._hookingRules);
 }
Пример #9
0
 public void AddRulesFrom(HookingSettings other)
 {
     _hookingRules.UnionWith(other._hookingRules);
 }
Пример #10
0
 public HookLoader(HookingSettings hookingSettings, Func<IEnumerable<IRunningProcess>, IEnumerable<IRunningProcess>> onSelectProcessToHook, Action<IRunningProcess, Module, Function> addHook)
 {
     _hookingSettings = hookingSettings;
     _onSelectProcessToHook = onSelectProcessToHook;
     _addHook = addHook;
 }
Пример #11
0
 public HookLoader(HookingSettings hookingSettings, Func <IEnumerable <IRunningProcess>, IEnumerable <IRunningProcess> > onSelectProcessToHook, Action <IRunningProcess, Module, Function> addHook)
 {
     _hookingSettings       = hookingSettings;
     _onSelectProcessToHook = onSelectProcessToHook;
     _addHook = addHook;
 }