예제 #1
0
 private void SetupCallbacks(TraceElements elements)
 {
     if (elements.HasFlag(TraceElements.Process))
     {
         _parser.ProcessStart += OnProcessStart;
         if (_includeInit)
         {
             _parser.ProcessDCStart += OnProcessDCStart;
             _parser.ProcessDCStop  += obj => ProcessTrace?.Invoke((ProcessTraceData)obj.Clone(), EventType.ProcessExited);
         }
         _parser.ProcessStop += OnProcessStop;
     }
     if (elements.HasFlag(TraceElements.Thread))
     {
         _parser.ThreadStart += OnThreadStart;
         _parser.ThreadStop  += OnThreadStop;
     }
     if (elements.HasFlag(TraceElements.Registry))
     {
         _parser.RegistryCreate += OnRegistryCreate;
         _parser.RegistryOpen   += obj => RegistryTrace?.Invoke((RegistryTraceData)obj.Clone(), EventType.RegistryOpenKey);
     }
 }
예제 #2
0
        private void OnProcessDCStart(ProcessTraceData obj)
        {
            var data = (ProcessTraceData)obj.Clone();

            ProcessTrace?.Invoke(data, EventType.ProcessExists);
        }
예제 #3
0
 private void OnProcessStart(ProcessTraceData obj)
 {
     ProcessTrace?.Invoke((ProcessTraceData)obj.Clone(), EventType.ProcessStart);
 }