public async void BtnCreateAccount_Click(object sender, EventArgs e) { //btnCreateAccount.Visible = false; if (nmbrAmountAccounts.Value > 100) { nmbrAmountAccounts.Value = 100; } else if (nmbrAmountAccounts.Value < 1) { nmbrAmountAccounts.Value = 1; } if (UseCaptchaService) { if (!Use2Cap) { if (secretkey.Text == "" || apikey.Text == "") { UseCaptchaService = false; autocap.Checked = false; } else { apixkey = apikey.Text; secxkey = secretkey.Text; } } else { if (captwoapikey.Text == "") { UseCaptchaService = false; autocap.Checked = false; } else { twocapkey = captwoapikey.Text; } } } if (checkBox1.Checked == true) { proxyval = textBox1.Text; proxyport = Convert.ToInt32(textBox2.Text); proxy = true; } else { proxy = false; } async Task makeSomeShitForValve() { var slowCaptchaMode = capHandMode.Checked; if (slowCaptchaMode) { capHandMode.Enabled = false; } for (var i = 0; i < nmbrAmountAccounts.Value; i++) { var accCreator = new AccountCreator(this, txtEmail.Text, txtAlias.Text, txtPass.Text, _index, UseCaptchaService); if (slowCaptchaMode) { await Task.Run(() => accCreator.Run()); } else { var thread = new Thread(accCreator.Run); thread.Start(); } _index++; } capHandMode.Enabled = true; } if (checkBox4.Checked == true) { if (!string.IsNullOrEmpty(file)) { await makeSomeShitForValve(); } else { MessageBox.Show("Please Select a File to Edit. :)"); } } else { await makeSomeShitForValve(); } }
public async void BtnCreateAccount_Click(object sender, EventArgs e) { Logger.Trace($"{nameof(btnCreateAccount)} was clicked..."); if (NumAccountsCount.Value > 100) { NumAccountsCount.Value = 100; } else if (NumAccountsCount.Value < 1) { NumAccountsCount.Value = 1; } Logger.Trace($"Accounts to create: {NumAccountsCount}."); Configuration.Captcha.Enabled = CbCapAuto.Checked && CbCapAuto.Enabled; if (Configuration.Captcha.Enabled) { Logger.Trace("Auto captcha is enabled."); switch (Configuration.Captcha.Service) { case Enums.CaptchaService.Captchasolutions: { if (string.IsNullOrEmpty(TbCapSolutionsApi.Text) || string.IsNullOrEmpty(TbCapSolutionsSecret.Text)) { Logger.Trace("Captchasolutions cannot be used. API and secret keys is empty! Auto captcha was disabled."); CbCapAuto.Checked = Configuration.Captcha.Enabled = false; } else { Logger.Trace("Using Captchasolutions..."); Configuration.Captcha.CaptchaSolutions.ApiKey = TbCapSolutionsApi.Text; Configuration.Captcha.CaptchaSolutions.ApiSecret = TbCapSolutionsSecret.Text; } } break; case Enums.CaptchaService.RuCaptcha: { if (string.IsNullOrEmpty(TbCapRuCapApi.Text)) { Logger.Trace("TwoCaptcha/RuCaptcha cannot be used. API key is empty! Auto captcha was disabled."); CbCapAuto.Checked = Configuration.Captcha.Enabled = false; } else { Logger.Trace("Using TwoCaptcha/RuCaptcha..."); Configuration.Captcha.RuCaptcha.ApiKey = TbCapRuCapApi.Text; } } break; default: CbCapAuto.Checked = Configuration.Captcha.Enabled = false; break; } } Configuration.Proxy.Enabled = CbProxyEnabled.Checked; if (ProxyManager.Enabled && ProxyManager.Current == null) { ProxyManager.GetNew(); } else if (!ProxyManager.Enabled) { ProxyManager.GetNew(); } if (CbFwEnable.Checked && string.IsNullOrEmpty(Configuration.Output.Path)) { Configuration.Output.Path = Path.Combine(Environment.CurrentDirectory, $"Accounts.{((CbFwOutType.SelectedIndex == 2) ? "csv" : "txt")}"); } if (CbFwEnable.Checked) { Logger.Info($"File writing is enabled and file will be here: {Configuration.Output.Path}."); } SaveConfig(); var slowCaptchaMode = Configuration.Captcha.HandMode = CbCapHandMode.Checked; for (var i = 0; i < NumAccountsCount.Value; i++) { Logger.Trace($"Account {i + 1} of {NumAccountsCount}."); var accCreator = new AccountCreator(this, Configuration.Clone()); if (slowCaptchaMode) { Logger.Trace($"Account {i + 1} of {NumAccountsCount}. Starting in async/await thread..."); await Task.Run(() => accCreator.Run()); } else { Logger.Trace($"Account {i + 1} of {NumAccountsCount}. Starting in new thread..."); var thread = new Thread(accCreator.Run); thread.Start(); } } }
public async void BtnCreateAccount_Click(object sender, EventArgs e) { Logger.Trace($"{nameof(btnCreateAccount)} was clicked..."); if (NumAccountsCount.Value > 100) { NumAccountsCount.Value = 100; } else if (NumAccountsCount.Value < 1) { NumAccountsCount.Value = 1; } Logger.Trace($"Accounts to create: {NumAccountsCount}."); switch (Configuration.Captcha.Service) { case Enums.CaptchaService.Captchasolutions: { if (string.IsNullOrEmpty(Configuration.Captcha.CaptchaSolutions.ApiKey) || string.IsNullOrEmpty(Configuration.Captcha.CaptchaSolutions.ApiSecret)) { Logger.Trace("Captchasolutions cannot be used. API and secret keys is empty! Checking modules..."); Configuration.Captcha.Service = Enums.CaptchaService.Module; goto case Enums.CaptchaService.Module; } Logger.Trace("Using Captchasolutions..."); } break; case Enums.CaptchaService.RuCaptcha: { if (string.IsNullOrEmpty(Configuration.Captcha.RuCaptcha.ApiKey)) { Logger.Trace("TwoCaptcha/RuCaptcha cannot be used. API key is empty! Checking modules..."); Configuration.Captcha.Service = Enums.CaptchaService.Module; goto case Enums.CaptchaService.Module; } Logger.Trace("Using TwoCaptcha/RuCaptcha..."); } break; case Enums.CaptchaService.Module: { if (ModuleManager.Modules.GetCaptchaSolvers().Count() < 1 && ModuleManager.Modules.GetReCaptchaSolvers().Count() < 1) { Logger.Trace("No any module with captcha solving support. Swithing to manual mode..."); Configuration.Captcha.Service = Enums.CaptchaService.None; goto default; } Logger.Trace("Using modules..."); } break; case Enums.CaptchaService.None: default: Logger.Trace("Using manual mode..."); break; } Configuration.Proxy.Enabled = CbProxyEnabled.Checked; if (ProxyManager.Enabled && ProxyManager.Current == null) { ProxyManager.GetNew(); } else if (!ProxyManager.Enabled) { ProxyManager.GetNew(); } if (CbFwEnable.Checked && string.IsNullOrEmpty(Configuration.Output.Path)) { Configuration.Output.Path = Path.Combine(Environment.CurrentDirectory, $"Accounts.{((CbFwOutType.SelectedIndex == 2) ? "csv" : "txt")}"); } if (CbFwEnable.Checked) { Logger.Info($"File writing is enabled and file will be here: {Configuration.Output.Path}."); } SaveConfig(); var slowCaptchaMode = Configuration.Captcha.Service == Enums.CaptchaService.None; for (var i = 0; i < NumAccountsCount.Value; i++) { Logger.Trace($"Account {i + 1} of {NumAccountsCount}."); var accCreator = new AccountCreator(this, Configuration.Clone()); if (slowCaptchaMode) { Logger.Trace($"Account {i + 1} of {NumAccountsCount}. Starting in async/await thread..."); await Task.Run(() => accCreator.Run()); } else { Logger.Trace($"Account {i + 1} of {NumAccountsCount}. Starting in new thread..."); var thread = new Thread(accCreator.Run); thread.Start(); } } }