Пример #1
0
        private string getCaptchaResponse()
        {
            string captchaResponse = null;

            NoCaptchaProxyless api = new NoCaptchaProxyless
            {
                ClientKey  = this.apiKey,
                WebsiteUrl = new Uri("http://" + Manager.selectedProfile.Domain),
                WebsiteKey = this.siteKey
            };

            if (!api.CreateTask())
            {
                //Console.WriteLine(api.ErrorMessage);
                Console.WriteLine("Something f****d up...");
            }
            else if (!api.WaitForResult())
            {
                Console.WriteLine("Could not solve the captcha.");
            }
            else
            {
                captchaResponse = api.GetTaskSolution();
                Console.WriteLine("Solution...:" + captchaResponse);
            }


            return(captchaResponse);
        }
Пример #2
0
        private string AntiCaptcha()
        {
            var api = new NoCaptchaProxyless
            {
                ClientKey  = StaticVars.AntiAPI,
                WebsiteUrl = new Uri("https://club.pokemon.com/us/pokemon-trainer-club/parents/sign-up"),
                WebsiteKey = "6LdpuiYTAAAAAL6y9JNUZzJ7cF3F8MQGGKko1bCy",
            };

            if (!api.CreateTask() || !api.WaitForResult())
            {
                if (api.ErrorMessage.Contains("ERROR_KEY_DOES_NOT_EXIST") ||
                    api.ErrorMessage.Contains("ERROR_ZERO_BALANCE") ||
                    api.ErrorMessage.Contains("ERROR_IP_NOT_ALLOWED") ||
                    api.ErrorMessage.Contains("ERROR_IP_BLOCKED")
                    )
                {
                    StaticVars.stop = true;
                }
                StaticVars.LogText += api.ErrorMessage + Environment.NewLine;
                return("");
            }
            else
            {
                return(api.GetTaskSolution());
            }
        }
Пример #3
0
        //public static void ExampleNoCaptchaProxyless()
        public static string ExampleNoCaptchaProxyless()
        {
            DebugHelper.VerboseMode = true;

            var api = new NoCaptchaProxyless
            {
                ClientKey  = "9ec539ed2708163fedbceb896bb1ba5f",
                WebsiteUrl = new Uri("https://profit.ly/login"),
                WebsiteKey = "6LcZXwkTAAAAAGa2Gk8w1CcQQzL2zyVs7p_bEvyC"
            };

            if (!api.CreateTask())
            {
                DebugHelper.Out("API v2 send failed. " + api.ErrorMessage, DebugHelper.Type.Error);
                System.Threading.Thread.Sleep(5000);         // Wait 5 sec
                ExampleNoCaptchaProxyless();                 // If error - call itself again. Reason: no idle worker availible. Endless cycle

                return("0");
            }
            else if (!api.WaitForResult())
            {
                DebugHelper.Out("Could not solve the captcha.", DebugHelper.Type.Error);
                return("1");
            }
            else
            {
                //DebugHelper.Out("Result: " + api.GetTaskSolution(), DebugHelper.Type.Success);
                return(api.GetTaskSolution());
            }
        }
Пример #4
0
        private string AntiCaptcha(CaptchaAPI model)
        {
            NoCaptchaProxyless api = new NoCaptchaProxyless
            {
                ClientKey  = model.api,
                WebsiteUrl = new Uri("https://club.pokemon.com/us/pokemon-trainer-club/parents/sign-up"),
                WebsiteKey = "6LdpuiYTAAAAAL6y9JNUZzJ7cF3F8MQGGKko1bCy",
            };

            if (!api.CreateTask() || !api.WaitForResult())
            {
                if (api.ErrorMessage.Contains("ERROR_KEY_DOES_NOT_EXIST") ||
                    api.ErrorMessage.Contains("ERROR_ZERO_BALANCE") ||
                    api.ErrorMessage.Contains("ERROR_IP_NOT_ALLOWED") ||
                    api.ErrorMessage.Contains("ERROR_IP_BLOCKED")
                    )
                {
                    model.IncrementFail();
                    model.enabled = false;
                }
                return("");
            }
            else
            {
                model.IncrementSuccess();
                return(api.GetTaskSolution());
            }
        }
Пример #5
0
        public static string GetResponse(string siteKey)
        {
            _semaphore.Wait();
            string result = null;

            if (!string.IsNullOrEmpty(GlobalConfiguration.Instance.AntiCaptchaKey))
            {
                try
                {
                    using (NoCaptchaProxyless ncp = new NoCaptchaProxyless(GlobalConfiguration.Instance.AntiCaptchaKey, new Uri("https://proxyconnection.touch.dofus.com/recaptcha"), siteKey))
                    {
                        ncp.CreateTask();
                        ncp.WaitForResult(300);

                        result = ncp.GetTaskSolution();
                    }
                }
                catch
                {
                    _semaphore.Release();
                    throw;
                }
            }

            _semaphore.Release();
            return(result);
        }
Пример #6
0
        private static void ExampleNoCaptchaProxyless()
        {
            DebugHelper.VerboseMode = true;

            var api = new NoCaptchaProxyless
            {
                ClientKey  = "1234567890123456789012",
                WebsiteUrl = new Uri("http://http.myjino.ru/recaptcha/test-get.php"),
                WebsiteKey = "6Lc_aCMTAAAAABx7u2W0WPXnVbI_v6ZdbM6rYf16"
            };

            if (!api.CreateTask())
            {
                DebugHelper.Out("API v2 send failed. " + api.ErrorMessage, DebugHelper.Type.Error);
            }
            else if (!api.WaitForResult())
            {
                DebugHelper.Out("Could not solve the captcha.", DebugHelper.Type.Error);
            }
            else
            {
                DebugHelper.Out("Result: " + api.GetTaskSolution(), DebugHelper.Type.Success);
            }
        }
Пример #7
0
        private (bool value, string errors) ExampleNoCaptchaProxyless(string pageurl, IWebDriver chromeDriver, ref int socapchadagiai)
        {
            DebugHelper.VerboseMode = true;
            var api = new NoCaptchaProxyless
            {
                ClientKey  = "c35c7cd7c3653e886a9e578c07166a06",
                WebsiteUrl = new Uri($"{pageurl}"),
                WebsiteKey = "6LdfCvAUAAAAAP-flt3eC-0pRnbbvRTUIeaa9rT9"
            };

            if (!api.CreateTask())
            {
                _dgvAccounts.Rows[_rowIndex].Cells["status"].Value = $"Giải cap cha không thành công {api.ErrorMessage}";
                return(false, api.ErrorMessage);
            }
            else if (!api.WaitForResult())
            {
                _dgvAccounts.Rows[_rowIndex].Cells["status"].Value = $"Giải cap cha không thành công - Could not solve the captcha.";
                return(false, "Could not solve the captcha.");
            }
            else
            {
                var resolveCapcha      = api.GetTaskSolution().GRecaptchaResponse;
                IJavaScriptExecutor js = (IJavaScriptExecutor)chromeDriver;
                socapchadagiai++;
                var noidung = js.ExecuteScript(@"function TIMHAMCALLBACK(capcha, j = 0){
                                                  var query = '';
                                                  var demsolan = j;
                                                  var listKeys = Object.keys(capcha);
                                                  var listValues = Object.values(capcha);
                                                  for (var i = 0; i < listKeys.length; i++) {
                                                    if(listKeys[i] === 'callback'){
                                                         console.log('callback');
                                                         return '.callback('
                                                       }else if(listValues[i] === undefined ||listValues[i] == null ){
                                                         continue;
                                                       }else if(demsolan > 2){
                                                          return 'dasd';
                                                       }
                                                       else{
                                                         var rs = TIMHAMCALLBACK(listValues[i], demsolan+1);
                                                         if(rs && rs.includes('callback')){
                                                           query += '.'+ listKeys[i] + rs;
                                                           return query;
                                                         }
                                                       }
                                                  }
                                                };
                                                return TIMHAMCALLBACK(___grecaptcha_cfg.clients[0]);");
                if (noidung.ToString().Contains("callback"))
                {
                    var query = "___grecaptcha_cfg.clients[0]" + noidung.ToString() + $"'{resolveCapcha}')";
                    js.ExecuteScript("document.getElementById('g-recaptcha-response').innerHTML='" + resolveCapcha + "';");
                    js.ExecuteScript(query);
                    if (chromeDriver.PageSource.Contains("opacity: 0.46; background-color: rgb(33, 33, 33)"))
                    {
                        while (chromeDriver.PageSource.Contains("opacity: 0.46; background-color: rgb(33, 33, 33)"))
                        {
                            Common.DelayMiliSeconde(1000);
                        }
                    }
                    _dgvAccounts.Rows[_rowIndex].Cells["status"].Value = $"Giải capcha thành công";
                    return(true, "Giải capcha thành công!");
                }

                _dgvAccounts.Rows[_rowIndex].Cells["status"].Value = $"Không thể load được trang sau khi giai capcha";
                return(false, "Không thể load được trang sau khi giai capcha 2");
            }
        }