private Hook(IntPtr id, string moduleName, string functionName, ISpyManager spyManager) { Id = id; FunctionName = functionName; ModuleName = moduleName; _spyManager = spyManager; }
private Hook(IntPtr id, string moduleName, string functionName, ISpyManager spyManager) { Id = id; FunctionName = functionName; ModuleName = moduleName; _spyManager = spyManager; }
protected ProcessBase(ISpyManager spyManager, int platformBits, string name, string path, Image icon) { Name = name; Path = path; SpyManager = spyManager; PlatformBits = platformBits; Icon = icon; }
protected ProcessBase(ISpyManager spyManager, int platformBits, string name, string path, Image icon) { Name = name; Path = path; SpyManager = spyManager; PlatformBits = platformBits; Icon = icon; }
public ApplicationPresenter(IApplicationView aView, ISpyManager aSpyManager, HookingSettings hookingSettings, int platformBits) { _processModulesDisplayer = new ProcessModulesDisplayer(this, aView); _hookingSettings = hookingSettings; _platformBits = platformBits; InitializePresenter(aView, aSpyManager); InitializeView(); }
public ApplicationPresenter(IApplicationView aView, ISpyManager aSpyManager, HookingSettings hookingSettings, int platformBits) { _processModulesDisplayer = new ProcessModulesDisplayer(this, aView); _hookingSettings = hookingSettings; _platformBits = platformBits; InitializePresenter(aView, aSpyManager); InitializeView(); }
private void InitializePresenter(IApplicationView aView, ISpyManager aSpyManager) { _selectedProcesses = Enumerable.Empty <IProcess>(); _selectedFunctions = Enumerable.Empty <Function>(); _view = aView; _spyManager = aSpyManager; _hookLoader = new HookLoader(_hookingSettings, FilterProcessesToApplyHookingSettingsOn, AddHookForRunningProcess); InitializeProcessHandlers(); _spyManager.ProcessStartedHandler = ProcessStartedHandler; _spyManager.ProcessTerminatedHandler = ProcessTerminatedHandler; _spyManager.FunctionCalledHandler = FunctionCalledHandler; _spyManager.HookStateChangedHandler = HookStateChangedHandler; _spyManager.AgentLoadHandler = AgentLoadHandler; }
public static IRunningProcess From(NktProcess aProcess, ISpyManager spyManager) { var modulePathByNameAndProcess = new Dictionary<int, string>(); if (aProcess.PlatformBits > 0 && aProcess.PlatformBits <= IntPtr.Size * 8) { var processModules = aProcess.Modules(); if (processModules != null) processModules.CollectAll().ForEach(m => { var moduleKey = (m.Name + aProcess.Id).GetHashCode(); if (!modulePathByNameAndProcess.ContainsKey(moduleKey)) modulePathByNameAndProcess.Add(moduleKey, m.Path); }); } return new RunningProcess(aProcess.Id, aProcess.Name, aProcess.Icon(), spyManager, aProcess.Path, aProcess.PlatformBits, modulePathByNameAndProcess); }
public static IRunningProcess From(NktProcess aProcess, ISpyManager spyManager) { var modulePathByNameAndProcess = new Dictionary <int, string>(); if (aProcess.PlatformBits > 0 && aProcess.PlatformBits <= IntPtr.Size * 8) { var processModules = aProcess.Modules(); if (processModules != null) { processModules.CollectAll().ForEach(m => { var moduleKey = (m.Name + aProcess.Id).GetHashCode(); if (!modulePathByNameAndProcess.ContainsKey(moduleKey)) { modulePathByNameAndProcess.Add(moduleKey, m.Path); } }); } } return(new RunningProcess(aProcess.Id, aProcess.Name, aProcess.Icon(), spyManager, aProcess.Path, aProcess.PlatformBits, modulePathByNameAndProcess)); }
//private IEnumerable<Module> _modules; #endregion #region Instance Creation public ProcessToBeHookedOnStart(string aPath, ISpyManager aSpyManager, int platformBits) : base(aSpyManager, platformBits, System.IO.Path.GetFileName(aPath), aPath, ProcessIcon.IconFrom(aPath)) { }
//private IEnumerable<Module> _modules; #endregion #region Instance Creation public ProcessToBeHookedOnStart(string aPath, ISpyManager aSpyManager, int platformBits) : base(aSpyManager, platformBits, System.IO.Path.GetFileName(aPath), aPath, ProcessIcon.IconFrom(aPath)) { }
public DisplayHookStateHandler(IApplicationView aView, ISpyManager aSpyManager) { _view = aView; _spyManager = aSpyManager; }
public static Module From(NktModule module, IRunningProcess aProcess, ISpyManager aSpyManager) { return(new RunningModule(module.Path, module.Name, module.BaseAddress, aProcess, aSpyManager)); }
public static Module From(NktModule module, IRunningProcess aProcess, ISpyManager aSpyManager) { return new RunningModule(module.Path, module.Name, module.BaseAddress, aProcess, aSpyManager); }
public RunningProcess(int id, string name, Image icon, ISpyManager spyManager, string path, int platformBits) : base(spyManager, platformBits, name, path, icon) { Id = id; }
public RunningModule(string path, string name, IntPtr baseAddress, IRunningProcess process, ISpyManager aSpyManager) : base(path, name, baseAddress) { _process = process; _spyManager = aSpyManager; }
public RunningModule(string path, string name, IntPtr baseAddress, IRunningProcess process, ISpyManager aSpyManager) : base(path, name, baseAddress) { _process = process; _spyManager = aSpyManager; }
public DisplayStartupProcessesHandler(IApplicationView aView, ISpyManager spyManager) { _view = aView; _spyManager = spyManager; }
public static Hook From(NktHook nktHook, ISpyManager aSyManager) { return(new Hook(nktHook.Id, nktHook.ModuleName(), nktHook.FunctionNameWithoutModule(), aSyManager)); }
private RunningProcess(int id, string name, Image icon, ISpyManager spyManager, string path, int platformBits, Dictionary <int, string> modulePathByNameAndProcess) : base(spyManager, platformBits, name, path, icon) { Id = id; _modulePathByNameAndProcess = modulePathByNameAndProcess; }
public static Hook From(NktHook nktHook, ISpyManager aSyManager) { return new Hook(nktHook.Id, nktHook.ModuleName(), nktHook.FunctionNameWithoutModule(), aSyManager); }
public RunningProcess(int id, string name, Image icon, ISpyManager spyManager, string path, int platformBits) : base(spyManager, platformBits, name, path, icon) { Id = id; }
private void InitializePresenter(IApplicationView aView, ISpyManager aSpyManager) { _selectedProcesses = Enumerable.Empty<IProcess>(); _selectedFunctions = Enumerable.Empty<Function>(); _view = aView; _spyManager = aSpyManager; _hookLoader = new HookLoader(_hookingSettings, FilterProcessesToApplyHookingSettingsOn, AddHookForRunningProcess); InitializeProcessHandlers(); _spyManager.ProcessStartedHandler = ProcessStartedHandler; _spyManager.ProcessTerminatedHandler = ProcessTerminatedHandler; _spyManager.FunctionCalledHandler = FunctionCalledHandler; _spyManager.HookStateChangedHandler = HookStateChangedHandler; _spyManager.AgentLoadHandler = AgentLoadHandler; }
public static IEnumerable<IRunningProcess> From(IEnumerable<NktProcess> expectedRunningProcesses, ISpyManager spyManager) { return expectedRunningProcesses.Where(p => p.PlatformBits > 0 && p.PlatformBits <= IntPtr.Size * 8).Select(process => From(process, spyManager)).ToArray(); }
private RunningProcess(int id, string name, Image icon, ISpyManager spyManager, string path, int platformBits, Dictionary<int, string> modulePathByNameAndProcess) : base(spyManager, platformBits, name, path, icon) { Id = id; _modulePathByNameAndProcess = modulePathByNameAndProcess; }
public static IEnumerable <IRunningProcess> From(IEnumerable <NktProcess> expectedRunningProcesses, ISpyManager spyManager) { return(expectedRunningProcesses.Where(p => p.PlatformBits > 0 && p.PlatformBits <= IntPtr.Size * 8).Select(process => From(process, spyManager)).ToArray()); }