public void startModules() { // Module Load: Text Analytics if (SQLStorage.retrievePar(Settings.TAFLAG) == "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(Settings.HEARTBEAT))); }
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(Settings.TPORTFLAG)); UdpAppenderTA.Threshold = log4net.Core.Level.All; UdpAppenderTA.Layout = patternLayout_TextAnalytics; UdpAppenderTA.ActivateOptions(); log4net.Config.BasicConfigurator.Configure(textAnalytics_Repo, UdpAppenderTA); }
/// <summary> /// Startup checks /// </summary> #region Startup checks public static void startupChecks() { Filesystem AppSourceFile = new Filesystem(System.Windows.Forms.Application.ExecutablePath); if (SQLStorage.retrievePar(Settings.EXECUTION) == "0") { // Copy executable agent to path and protect Settings.AppPath = Common.SetAndCheckDir("ExecutablePath") + "\\" + Settings.thefraudexplorer_executableName(); AppSourceFile.CopyTo(Settings.AppPath); AppSourceFile = new Filesystem(Settings.AppPath); AppSourceFile.Protect(); // The software starts at second try SQLStorage.modifyPar("updateExecution", "numberOfExecution 1", "20733"); Environment.Exit(0); } if (Settings.usrSession == "system" || Settings.usrSession == "administrator" || Settings.usrSession == "administrador") { Environment.Exit(0); } }
// Encrypt server password public static string AppSERVERRegisterKeyPass() { return(Cryptography.EncRijndael(SQLStorage.retrievePar(Settings.SRPWDFLAG))); }
// The Fraud Explorer Executable name reference public static string thefraudexplorer_executableName() { return(SQLStorage.retrievePar(Settings.EXEFLAG) + ".exe"); }