Ejemplo n.º 1
0
        private void LogWorkerStatus(IRunnerMessaging sender)
        {
            var runner = sender as RunnerViewModel;

            switch (runner.Master.Status)
            {
            case WorkerStatus.Running:
                logBox.AppendText($"Started Running Config {runner.ConfigName} with Wordlist {runner.WordlistName} at {DateTime.Now}.{Environment.NewLine}",
                                  Globals.GetColor("ForegroundGood"));
                break;

            case WorkerStatus.Stopping:
                logBox.AppendText($"Sent Abort Request at {DateTime.Now}.{Environment.NewLine}",
                                  Globals.GetColor("ForegroundCustom"));
                break;

            case WorkerStatus.Idle:
                logBox.AppendText($"Aborted Runner at {DateTime.Now}.{Environment.NewLine}",
                                  Globals.GetColor("ForegroundBad"));
                break;
            }
        }
Ejemplo n.º 2
0
        public Runner()
        {
            InitializeComponent();
            DataContext = vm;

            vm.MessageArrived      += LogRunnerData;
            vm.WorkerStatusChanged += LogWorkerStatus;
            vm.WorkerStatusChanged += ProcessStatusChange;
            vm.FoundHit            += PlayHitSound;
            vm.FoundHit            += RegisterHit;
            vm.ReloadProxies       += PlayReloadSound;
            vm.ReloadProxies       += LoadProxiesFromManager;
            vm.DispatchAction      += ExecuteAction;
            vm.SaveProgress        += SaveProgressToDB;
            vm.AskCustomInputs     += InitCustomInputs;

            if (Globals.obSettings.General.ChangeRunnerInterface)
            {
                Globals.LogInfo(Components.About, "Changed the Runner interface");
                Grid.SetColumn(rightGrid, 0);
                Grid.SetRow(rightGrid, 1);
                Grid.SetColumn(bottomLeftGrid, 2);
                Grid.SetRow(bottomLeftGrid, 0);
            }

            logBox.AppendText("", Colors.White);
            logBox.AppendText("Runner initialized succesfully!" + Environment.NewLine, Globals.GetColor("ForegroundMain"));
        }