示例#1
0
 private void ApiMode_MouseDown(object sender, MouseButtonEventArgs e)
 {
     fileMode.Foreground          = Globals.GetBrush("ForegroundMain");
     pasteMode.Foreground         = Globals.GetBrush("ForegroundMain");
     apiMode.Foreground           = Globals.GetBrush("ForegroundMenuSelected");
     modeTabControl.SelectedIndex = 2;
 }
示例#2
0
        private void checkBalanceButton_Click(object sender, RoutedEventArgs e)
        {
            // Save
            IOManager.SaveSettings(Globals.rlSettingsFile, Globals.rlSettings);

            double balance = 0;

            try
            {
                switch (Globals.rlSettings.Captchas.CurrentService)
                {
                case BlockCaptcha.CaptchaService.AntiCaptcha:
                    balance = new AntiCaptcha(Globals.rlSettings.Captchas.AntiCapToken, 0).GetBalance();
                    break;

                case BlockCaptcha.CaptchaService.DBC:
                    balance = new DeathByCaptcha(Globals.rlSettings.Captchas.DBCUser, Globals.rlSettings.Captchas.DBCPass, 0).GetBalance();
                    break;

                case BlockCaptcha.CaptchaService.DeCaptcher:
                    balance = new DeCaptcher(Globals.rlSettings.Captchas.DCUser, Globals.rlSettings.Captchas.DCPass, 0).GetBalance();
                    break;

                case BlockCaptcha.CaptchaService.ImageTypers:
                    balance = new ImageTyperz(Globals.rlSettings.Captchas.ImageTypToken, 0).GetBalance();
                    break;

                case BlockCaptcha.CaptchaService.TwoCaptcha:
                    balance = new TwoCaptcha(Globals.rlSettings.Captchas.TwoCapToken, 0).GetBalance();
                    break;

                case BlockCaptcha.CaptchaService.RuCaptcha:
                    balance = new RuCaptcha(Globals.rlSettings.Captchas.RuCapToken, 0).GetBalance();
                    break;

                case BlockCaptcha.CaptchaService.AZCaptcha:
                    balance = new AZCaptcha(Globals.rlSettings.Captchas.AZCapToken, 0).GetBalance();
                    break;

                case BlockCaptcha.CaptchaService.SolveRecaptcha:
                    balance = new SolveReCaptcha(Globals.rlSettings.Captchas.SRUserId, Globals.rlSettings.Captchas.SRToken, 0).GetBalance();
                    break;

                case BlockCaptcha.CaptchaService.CaptchasIO:
                    balance = new CaptchasIO(Globals.rlSettings.Captchas.CIOToken, 0).GetBalance();
                    break;

                default:
                    balance = 999;
                    break;
                }
            }
            catch { balanceLabel.Content = "WRONG TOKEN / CREDENTIALS"; balanceLabel.Foreground = Globals.GetBrush("ForegroundBad"); return; }

            balanceLabel.Content    = balance;
            balanceLabel.Foreground = balance > 0 ? Globals.GetBrush("ForegroundGood") : Globals.GetBrush("ForegroundBad");
        }
示例#3
0
 private void menuOptionSelected(object sender)
 {
     foreach (var child in topMenu.Children)
     {
         try
         {
             var c = (Label)child;
             c.Foreground = Globals.GetBrush("ForegroundMain");
         }
         catch { }
     }
     ((Label)sender).Foreground = Globals.GetBrush("ForegroundMenuSelected");
 }
        private void checkBalanceButton_Click(object sender, RoutedEventArgs e)
        {
            // Save
            IOManager.SaveSettings(Globals.rlSettingsFile, Globals.rlSettings);

            double balance = 0;

            try
            {
                balance = Service.Initialize(Globals.rlSettings.Captchas).GetBalance();
            }
            catch { balanceLabel.Content = "WRONG TOKEN / CREDENTIALS"; balanceLabel.Foreground = Globals.GetBrush("ForegroundBad"); return; }

            balanceLabel.Content    = balance;
            balanceLabel.Foreground = balance > 0 ? Globals.GetBrush("ForegroundGood") : Globals.GetBrush("ForegroundBad");
        }
示例#5
0
        public void SetStyle()
        {
            try
            {
                var brush = Globals.GetBrush("BackgroundMain");

                if (!Globals.obSettings.Themes.UseImage)
                {
                    Background      = brush;
                    Main.Background = brush;
                }
                else
                {
                    // BACKGROUND
                    if (File.Exists(Globals.obSettings.Themes.BackgroundImage))
                    {
                        var bbrush = new ImageBrush(new BitmapImage(new Uri(Globals.obSettings.Themes.BackgroundImage)));
                        bbrush.Opacity = (double)((double)Globals.obSettings.Themes.BackgroundImageOpacity / (double)100);
                        Background     = bbrush;
                    }
                    else
                    {
                        Background = brush;
                    }

                    // LOGO
                    if (File.Exists(Globals.obSettings.Themes.BackgroundLogo))
                    {
                        var lbrush = new ImageBrush(new BitmapImage(new Uri(Globals.obSettings.Themes.BackgroundLogo)));
                        lbrush.AlignmentX = AlignmentX.Center;
                        lbrush.AlignmentY = AlignmentY.Center;
                        lbrush.Stretch    = Stretch.None;
                        lbrush.Opacity    = (double)((double)Globals.obSettings.Themes.BackgroundImageOpacity / (double)100);
                        Main.Background   = lbrush;
                    }
                    else
                    {
                        Main.Background = new ImageBrush(new BitmapImage(new Uri(@"pack://application:,,,/"
                                                                                 + Assembly.GetExecutingAssembly().GetName().Name
                                                                                 + ";component/"
                                                                                 + "Images/Themes/empty.png", UriKind.Absolute)));
                    }
                }
            }
            catch { }
        }
示例#6
0
        public Stacker(ConfigViewModel config)
        {
            InitializeComponent();
            vm          = new StackerViewModel(config);
            DataContext = vm;

            // Style the LoliScript editor
            loliScriptEditor.ShowLineNumbers     = true;
            loliScriptEditor.TextArea.Foreground = new SolidColorBrush(Colors.Gainsboro);
            loliScriptEditor.TextArea.TextView.LinkTextForegroundBrush = new SolidColorBrush(Colors.DodgerBlue);
            using (XmlReader reader = XmlReader.Create("LSHighlighting.xshd"))
            {
                loliScriptEditor.SyntaxHighlighting = HighlightingLoader.Load(reader, HighlightingManager.Instance);
            }

            // Load the Syntax Helper XML
            XmlDocument doc = new XmlDocument();

            try {
                doc.Load("SyntaxHelper.xml");
                var main = doc.DocumentElement.SelectSingleNode("/doc");
                syntaxHelperItems = main.ChildNodes;

                // Only bind the keydown event if the XML was successfully loaded
                loliScriptEditor.KeyDown += loliScriptEditor_KeyDown;
            }
            catch { }

            // Make the Avalon Editor for Syntax Helper and style it
            toolTipEditor = new TextEditor();
            toolTipEditor.TextArea.Foreground = Globals.GetBrush("ForegroundMain");
            toolTipEditor.Background          = new SolidColorBrush(Color.FromArgb(22, 22, 22, 50));
            toolTipEditor.TextArea.TextView.LinkTextForegroundBrush = new SolidColorBrush(Colors.DodgerBlue);
            toolTipEditor.FontSize = 11;
            toolTipEditor.VerticalScrollBarVisibility   = ScrollBarVisibility.Hidden;
            toolTipEditor.HorizontalScrollBarVisibility = ScrollBarVisibility.Hidden;
            using (XmlReader reader = XmlReader.Create("LSHighlighting.xshd"))
            {
                toolTipEditor.SyntaxHighlighting = HighlightingLoader.Load(reader, HighlightingManager.Instance);
            }

            toolTip = new ToolTip {
                Placement = PlacementMode.Relative, PlacementTarget = loliScriptEditor
            };
            toolTip.Content          = toolTipEditor;
            loliScriptEditor.ToolTip = toolTip;

            // Load the script
            vm.LS = new LoliScript(config.Config.Script);
            loliScriptEditor.Text = vm.LS.Script;

            // If the user prefers Stack view, switch to it
            if (!Globals.obSettings.General.DisplayLoliScriptOnLoad)
            {
                stackButton_Click(this, null);
            }

            // Style the logRTB
            logRTB.Font      = new System.Drawing.Font("Consolas", 10);
            logRTB.BackColor = System.Drawing.Color.FromArgb(22, 22, 22);

            // Hook the context menu to the logRTB
            System.Windows.Forms.ContextMenu menu = new System.Windows.Forms.ContextMenu();
            System.Windows.Forms.MenuItem    item = new System.Windows.Forms.MenuItem();
            item.Text   = "Clear";
            item.Click += ClearDebuggerLog;
            menu.MenuItems.Add(item);
            logRTB.ContextMenu = menu;
            logRTB.MouseClick += DebuggerLogRightClick;

            foreach (string i in Enum.GetNames(typeof(ProxyType)))
            {
                if (i != "Chain")
                {
                    proxyTypeCombobox.Items.Add(i);
                }
            }

            proxyTypeCombobox.SelectedIndex = 0;

            foreach (var t in Globals.environment.GetWordlistTypeNames())
            {
                testDataTypeCombobox.Items.Add(t);
            }

            testDataTypeCombobox.SelectedIndex = 0;

            // Initialize debugger
            debugger.WorkerSupportsCancellation = true;
            debugger.Status              = WorkerStatus.Idle;
            debugger.DoWork             += new DoWorkEventHandler(debuggerCheck);
            debugger.RunWorkerCompleted += new RunWorkerCompletedEventHandler(debuggerCompleted);

            this.SaveConfig += Globals.mainWindow.ConfigsPage.ConfigManagerPage.OnSaveConfig;
        }