Giter VIP home page Giter VIP logo

cloudflaresolverre's People

Contributors

ngosang avatar ryuzakih avatar uponatime2019 avatar zaczero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cloudflaresolverre's Issues

[CloudflareSolverRe] https://sound-park.world - Error parsing JS challenge html

using CloudflareSolverRe 1.0.5 with Jackett.
currently unable to access https://sound-park.world/, failing with Error parsing JS challenge html
stack trace follows:

Jackett.Common.IndexerException: Exception (soundpark): Error parsing JS challenge html ---> System.Exception: Error parsing JS challenge html
   at CloudflareSolverRe.Types.Javascript.JsChallenge.Parse(String html, Uri siteUrl)
   at CloudflareSolverRe.Solvers.JsChallengeSolver.<SolveChallenge>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CloudflareSolverRe.Solvers.JsChallengeSolver.<Solve>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CloudflareSolverRe.CloudflareSolver.<SolveJavascriptChallenge>d__35.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CloudflareSolverRe.CloudflareSolver.<SolveWithJavascript>d__33.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CloudflareSolverRe.CloudflareSolver.<Solve>d__32.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CloudflareSolverRe.CloudflareSolver.<Solve>d__31.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CloudflareSolverRe.CloudflareSolver.<>c__DisplayClass30_0.<<Solve>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CloudflareSolverRe.Utilities.SemaphoreLocker.<LockAsync>d__1`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CloudflareSolverRe.CloudflareSolver.<Solve>d__30.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CloudflareSolverRe.ClearanceHandler.<GetClearance>d__24.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CloudflareSolverRe.ClearanceHandler.<SendAsync>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Net.Http.HttpClient.<FinishSendAsyncBuffered>d__58.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Jackett.Common.Utils.Clients.HttpWebClient.<Run>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Jackett.Common.Utils.Clients.WebClient.<GetString>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Jackett.Common.Indexers.BaseWebIndexer.<RequestStringWithCookies>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Jackett.Common.Indexers.CardigannIndexer.<PerformQuery>d__29.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Jackett.Common.Indexers.BaseIndexer.<ResultsForQuery>d__69.MoveNext()
   --- End of inner exception stack trace ---
   at Jackett.Common.Indexers.BaseIndexer.<ResultsForQuery>d__69.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Jackett.Common.Indexers.BaseWebIndexer.<ResultsForQuery>d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Jackett.Common.Services.IndexerManagerService.<TestIndexer>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Jackett.Server.Controllers.IndexerApiController.<Test>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.TaskOfIActionResultExecutor.<Execute>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeActionMethodAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeNextActionFilterAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeInnerFilterAsync>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeNextResourceFilter>d__23.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeFilterPipelineAsync>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeAsync>d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Builder.RouterMiddleware.<Invoke>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.<Invoke>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.<Invoke>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Jackett.Server.Middleware.CustomExceptionHandler.<Invoke>d__3.MoveNext()

Soudpark is a semi-private music tracker with free registration so you should be able to test fairly easily I think.
hopefully you can provide a solution.
Thanks.

Could not run the DLL using Dotnet

Hey,
I used to build the solution, tried to run the DLL via dotnet CloudSolverRe.dll but it didnt work, showed me up that error:
A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Users\x\Desktop\CloudflareSolverRe-master\test\CloudflareSolverRe.Tests\bin\Debug\netcoreapp2.1'.
Failed to run as a self-contained app. If this should be a framework-dependent app, add the C:\Users\x\Desktop\CloudflareSolverRe-master\test\CloudflareSolverRe.Tests\bin\Debug\netcoreapp2.1\CloudflareSolverRe.runtimeconfig.json file specifying the appropriate framework.
Is there any solution for that?
Thanks in advance

use URL as provided not http

Hi,
is it possible to provide the URL as provided and not try to use http?

Reason:
Even when I use the url https://uam.hitmehard.fun/HIT CloudflareSolverRe tries to request via http.

But the rotating proxy service I use (not rotating on every request but after a few min or on fails) jumps to the next proxy on 503 internally and after a few tries it sends a "504 Gateway Timeout - unable to find suitable sub-proxy"
And the proxy service doesn't want to change the product and told: just request via https then It won't happen - who uses http on Cloudflare anyway?

Javascript isn't solved, cf_clearance missing?

@ngosang
I'm trying to use your solution on this website:
https://getwsocourse.com/

But it keeps failing.

As an alternative I used selenium + chrome to actually load a page, wait for it to go through in 5 seconds, then extract cookies and use those cookies in my web requests. It worked fine, until recently. And I did notice that the cf_clearance cookie is now missing, while __cfduid is still there, so Cloudflare might have changed something again. Even my solution with selenium + chrome is no longer working.

If you can't replicate the issue on getwsocourse, you can also try it here:
http://www.edollarearn.com/
...same issue.

Help (ByPass CL Block)

ERROR: Método no encontrado: 'System.Threading.Tasks.Task`1<CloudflareSolverRe.Types.SolveResult> CloudflareSolverRe.CloudflareSolver.Solve(System.Net.Http.HttpClient, System.Net.Http.HttpClientHandler, System.Uri, System.String, System.Threading.CancellationToken)'.

New CF Challenge : __cf_chl_jschl_tk__ (PHP form)

This is the brand new CF challenge, that some websites adopted. Basically, at the end of the CF DDoS website, you have a form that the browser sends to the website, which verifies your access, and then permits you to access the website.

maybe cloudflare change there code again

`var target = new Uri("https://kissasian.sh/");

                var cf = new CloudflareSolver
                {
                    MaxTries = 3,
                    ClearanceDelay = 3000
                };

                var handler = new HttpClientHandler();
                var client = new HttpClient(handler);

                var result1 = cf.Solve(client, handler, target).Result;

                if (!result1.Success)
                {
                    Console.WriteLine($"[Failed] Details: {result1.FailReason}");
                    return;
                }

                // Once the protection has been bypassed we can use that HttpClient to send the requests as usual
                var content = client.GetStringAsync(target).Result;
                Console.WriteLine($"Server response: {content}");
                break;`

Unhandled exception. System.AggregateException: One or more errors occurred. (Input string was not in a correct format.)
---> System.FormatException: Input string was not in a correct format.
at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type)
at System.Double.Parse(String s)
at CloudflareSolverRe.Types.Javascript.JsFuck.DecodeNumber(String encodedNumber)
at CloudflareSolverRe.Types.Javascript.JsCalculation.Solve()
at CloudflareSolverRe.Types.Javascript.JsCalculation.get_Result()
at CloudflareSolverRe.Types.Javascript.JsChallenge.ApplyCalculation(Double number, IJsCalculation calculation)
at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable1 source, TAccumulate seed, Func3 func)
at CloudflareSolverRe.Types.Javascript.JsChallenge.Solve()
at CloudflareSolverRe.Solvers.JsChallengeSolver.SolveChallenge(String html)
at CloudflareSolverRe.Solvers.JsChallengeSolver.Solve()
at CloudflareSolverRe.CloudflareSolver.SolveJavascriptChallenge(Nullable1 jsDetectResult) at CloudflareSolverRe.CloudflareSolver.SolveWithJavascript(Int32 tries) at CloudflareSolverRe.CloudflareSolver.Solve() at CloudflareSolverRe.CloudflareSolver.Solve(HttpClient httpClient, CloudflareHandler cloudflareHandler, Uri siteUrl, CancellationToken cancellationToken) at CloudflareSolverRe.CloudflareSolver.<>c__DisplayClass30_0.<<Solve>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at CloudflareSolverRe.Utilities.SemaphoreLocker.LockAsync[T](Func1 worker)
at CloudflareSolverRe.CloudflareSolver.Solve(HttpClient httpClient, HttpClientHandler httpClientHandler, Uri siteUrl, CancellationToken cancellationToken, Boolean randomUserAgent)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task1.get_Result()
at KissAsianData.Program.Main(String[] args) in C:\Users\Long charmroeun\source\repos\kisscambodia\KissAsianData\Program.cs:line 287
at KissAsianData.Program.

(String[] args)

C:\Users\Long charmroeun\source\repos\kisscambodia\KissAsianData>

Javascript regex update

Cloudflare was updated recently, and the:
CloudflareSolverRe.Types.Javascript.JsChallenge.JsChallengeRegex
...needs an update.

I'm using this one:
private static readonly Regex JsChallengeRegexS = new Regex(@"(?<script>.*?var s,t,o,p, b,r,e,a,k,i,n,g,\w, (?<className>\w+?)={""(?<propName>\w+?)"":(?<propValue>.*?)};[\w\W\s\S\n\r.]*?(?<calculations>\s*?\w+?\.\w+?[+\-*\/]=(?:(?<normal>(?:\+|\(|\)|\!|\[|\]|\/)+?;)|(?<charCode>(?:\+|\(|\)|\!|\[|\]|\/)+?\(function.*?}\(.*?\)\)\);)|(?<cfdn>function\(.\)\{var.*?;\s.*?;)))+.*?a\.value\s=\s\(\+\w+\.\w+\)\.toFixed\((?<round>\d+)\);.*?[\w\W\s\S\n\r.]*?},\s*(?<delay>\d+)\);.*?)([\w\W\s\S\n\r.]*?form.*action="")(?<action>\S+?)("")([\w\W\s\S\n\r.]*?name=""r""\svalue="")(?<r>\S+?)(""[\w\W\s\S\n\r.]*?value="")(?<jschl_vc>\w*)(""[\w\W\s\S\n\r.]*?name=""pass""\svalue="")(?<pass>\S+?)(""[\w\W\s\S\n\r.]*?cf-dn-\S+"">)(?<cf_dn>\S+?)(</div>)", RegexOptions.Singleline);
...and it's working fine.

iptorrents doesnt work

I am using the latest git source. I started to look into it but got lost. I found the JsChallengeRegex doesnt work anymore. "s" seems to have been replaced with "r". I made a change for that to pass but then just got lost. Any help would work great.

[NuGet] 10% Cashback on 2Catpcha API

Recently I've updated my 2Catpcha & Anti-Captcha APIs and I would suggest updating them in your library as well. Small bug fixes, new captchas and.. 10% cashback on 2captcha resolver. Users would appreciate this update ;-))

200418205947_firefox_1ce4c8

Not working at www.curseforge.com

URL: https://www.curseforge.com/wow/addons/deadly-boss-mods

This code fails with exception CloudflareSolverRe.Exceptions.CloudflareClearanceException: Clearance failed after 3 attempt(s).

Not working even if I increase number of MaxTries nor incereasing ClearanceDelay.

But when I try URL from this project tests, everything is working. Maybe www.curseforge.com uses new protection?

Pythons library https://pypi.org/project/cfscrape/ can overpass even this Cloudflare protection so it's doable but I don't know how. :)

            var target = new Uri("https://www.curseforge.com/wow/addons/deadly-boss-mods");

            var handler = new ClearanceHandler
            {
                MaxTries = 3,
                ClearanceDelay = 3000
            };

            try
            {
                var client = new HttpClient(handler);
                var content = await client.GetStringAsync(target);
            }
            catch (Exception ex) { Console.WriteLine(ex.ToString()); }

Javascript challenge throws exception "Input string was not in a correct format."

On the website https://kissasian.sh/, CloudflareSolver fails with the following exception several times before being able to pass the challenge

[5:22:25.419] EXCEPTION SOLVING CLOUDFLARE -> Input string was not in a correct format. ->    at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
   at CloudflareSolverRe.Types.Javascript.JsFuck.DecodeNumber(String encodedNumber)
   at CloudflareSolverRe.Types.Javascript.JsCalculation.Solve()
   at CloudflareSolverRe.Types.Javascript.JsChallenge.ApplyCalculation(Double number, IJsCalculation calculation)
   at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)
   at CloudflareSolverRe.Types.Javascript.JsChallenge.Solve()
   at CloudflareSolverRe.Solvers.JsChallengeSolver.<SolveChallenge>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CloudflareSolverRe.Solvers.JsChallengeSolver.<Solve>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CloudflareSolverRe.CloudflareSolver.<SolveJavascriptChallenge>d__35.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at CloudflareSolverRe.CloudflareSolver.<SolveWithJavascript>d__33.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CloudflareSolverRe.CloudflareSolver.<Solve>d__32.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CloudflareSolverRe.CloudflareSolver.<>c__DisplayClass28_0.<<Solve>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CloudflareSolverRe.Utilities.SemaphoreLocker.<LockAsync>d__1`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CloudflareSolverRe.CloudflareSolver.<Solve>d__28.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at DecipherAIO.Program.<SolveCloudflare>d__2.MoveNext() in C:\Users\matti\source\repos\DecipherAIO\DecipherAIO\Program.cs:line 189

My code:

                var target = new Uri("https://kissasian.sh/");

                var cf = new CloudflareSolver
                {
                    MaxTries = 3,
                    ClearanceDelay = 5000
                };

                Logger.Warn($"SOLVING CLOUDFLARE");
                var result = await cf.Solve(siteUrl: target);

                if (result.DetectResult.ToString().Equals("NoProtection"))
                {
                    Logger.Success($"NO CLOUDFLARE DETECTED");
                }

                if (result.Success)
                {
                    Logger.Success($"SOLVED CLOUDFLARE");
                    break;
                }
                else
                {
                    Logger.Error($"ERROR SOLVING CLOUDFLARE -> {result.FailReason}");
                }`

Fix for captcha solving + SolveResult.UserAgent is null

Hello,

Solving a challenge using a captcha provider will throw an exception here because Id is null.
In order to fix that, you can set Id to string.Empty in this method.

I also noticed that the UserAgent of a returned SolveResult is always null, I don't know if this is only for captcha challenges as I was too lazy to check for javascript challenges too, but this is something else you should fix for sure ;)

Regards,
Matt.

Not working anymore

Did they change the challenge? It doesn't work anymore (tested iptorrents, spacetorrents, turkz.org). Please help.

Not working simple JS challenge

This URL protected by Cloudflare: https://warthunder.ru/ru/community/userinfo/?nick=Keofox
Using Xamarin.Android. In debug, my program stuck on this string: var result = cf.Solve(target).Result;. I waiting for 5 and 10 minutes and don't get the result. This is my code:

 private async Task ConnectToSiteAsync()
    {
        var target = new Uri("https://warthunder.ru/ru/community/userinfo/?nick=Keofox");

        var cf = new CloudflareSolver
        {
            MaxTries = 3,
            ClearanceDelay = 3000
        };

        var result = cf.Solve(target).Result;

        if (!result.Success)
        {
            Console.WriteLine($"[Failed] Details: {result.FailReason}");
            return;
        }

        var request = (HttpWebRequest)WebRequest.Create(target);
        request.Headers.Add(HttpRequestHeader.Cookie, result.Cookies.AsHeaderString());
        request.Headers.Add(HttpRequestHeader.UserAgent, result.UserAgent);

        var response = (HttpWebResponse)request.GetResponse();
        var content = new StreamReader(response.GetResponseStream()).ReadToEnd();
        Log.Debug("My result", content);
    }

Calling method in OnCreate like this: ConnectToSiteAsync().Wait();

captcha-bypass?

here is the source to the page that i cannot bypass.

<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->
<head>

<title>Please Wait... | Cloudflare</title>
  
<meta name="captcha-bypass" id="captcha-bypass" />
<meta charset="UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
<meta name="robots" content="noindex, nofollow" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/cf.errors.css" type="text/css" media="screen,projection" />
<!--[if lt IE 9]><link rel="stylesheet" id='cf_styles-ie-css' href="/cdn-cgi/styles/cf.errors.ie.css" type="text/css" media="screen,projection" /><![endif]-->
<style type="text/css">body{margin:0;padding:0}</style>


<!--[if gte IE 10]><!-->
<script>
  if (!navigator.cookieEnabled) {
    window.addEventListener('DOMContentLoaded', function () {
      var cookieEl = document.getElementById('cookie-alert');
      cookieEl.style.display = 'block';
    })
  }
</script>
<!--<![endif]-->


  
    <script type="text/javascript">
    //<![CDATA[
    (function(){
      window._cf_chl_opt={
        cvId: "2",
        cType: "managed",
        cNounce: "60922",
        cRay: "6662ad3e8acd3163",
        cHash: "1cc6fb5c5389892",
        cFPWv: "g",
        cTTimeMs: "4000",
        cLt: "n",
        cRq: {
          ru: "aHR0cDovL29sZC5zdGFyY2l0eWdhbWVzLmNvbS9idXlsaXN0L3NlYXJjaD9zZWFyY2gtdHlwZT1jYXRlZ29yeSZpZD01MDgy",
          ra: "TW96aWxsYS81LjAgKFdpbmRvd3MgTlQgNi4yOyBXaW42NDsgeDY0KSBBcHBsZVdlYktpdC81MzcuMzYgKEtIVE1MLCBsaWtlIEdlY2tvKSBDaHJvbWUvNjAuMC4zMTEyLjc4IFNhZmFyaS81MzcuMzY=",
          rm: "R0VU",
          d: "2uVQTTBLDXbVrvZzlo73g7Yr1YYVKbl5sp89jp2O7LJSCYWOCAh2fidyKhGr2VO5pHrxRabRTKxDZp6YY7UFhpsdFJ7u/rk6BlyuVGtO0XVVYo44OKFs47a/caja4kaEMWvP2LMkUQcpimObQHl1jiLaI66Tp+WVPH+lSi+uUWpEb1z4/IMh9APC3tWcsF3+w0ThJNlBDJ7XwxkdpD/lb/xhYFrM4GojhuVB2SAk+ppdxcBDRigt+txW7F0Uq5BcUvwAYztuYlRMSx51pk7g+Bp7bfL2/m3vTJj1zEs5YetAChPkiS+36fOjARw/ocoMUG69+KUUx9+2fqO7Hlj95tKOx/4YGPZQ21HMrLUplWVm86f7I6NytwWGjap4p3eJnfXv7jSM1nFpLgV5I91/VqdYvGmiFWyFpNV7YoA80sLo8x7a4XJFeosb6g4K5AxkqEdQJXxfWlLov4eazLGKLJI8FfNh20V54D9zFc4Y6rwSBbAVsDrApZrLT/Ey8cO2Dh50nIaVois7QGx/O08xtK7bGdaC/ZXUNOsdkT13FQHFrrrIBBxZC6sykSpVLlM+kqa5+qawdzbFXrKJ7tkSx5H8hNdu0fwFt9UdfhuB0Cjtjw+1+8yto/TTl5ToTeNbibFozxkOAMuK7a1BHTpIWzUOZC7qxNu7dy1a8r8IcS2g2uioCZ8yFx5JbhlGFEGm/N6jEGIE/l4dtjZ6jfNV1cpG5WZBajY+yFmg4sA6HS4GyxyuMUcS+yZIiEAn8hJIDYTZdTRyupMAe02DsYQiFSxrAIWoeFtvnoXIfRNfxwk0+coNEIq2iZTioO1ewKnnjAlUw5Z1hjDsmzp8YJwpXbJU6LpFXt92MdiWQ9ZAj+kFNSYs7dKJkpcqVd4xwCRG7D2h3+mY+EqTiaL3djUXhWL4xpp6F68QuA0PbhUccLboGMcpiERmcm+rHp0/cIkp",
          t: "MTYyNDgzODg2NS43MDAwMDA=",
          m: "hssu9WNZXovxjZLvZC9vsWEOwWwEFPp74dbQ73XJVeM=",
          i1: "+WpCzBznp/HWpENOOQmTWw==",
          i2: "uCGoSZskZ8yqoZvIa0xDyg==",
          zh: "p611eV/A2fpEkfRww3F8M+TYqY1je5okfTJJdrAqBI4=",
          uh: "6RTndbNK0oR/lwz0pnNRHEp7GMeTS+kS6fZpqaDq5OY=",
          hh: "MlLK9Jn2KT+uqGrcquNyZrERCf5cO05hFrOkvxy84tA=",
        }
      };
    }());
    //]]>
    </script>
  

<style type="text/css">
  #cf-wrapper #spinner {width:69px; margin:  auto;}
  #cf-wrapper #cf-please-wait{text-align:center}
  .attribution {margin-top: 32px;}
  .bubbles { background-color: #f58220; width:20px; height: 20px; margin:2px; border-radius:100%; display:inline-block; }
  #cf-wrapper #challenge-form { padding-top:25px; padding-bottom:25px; }
  #cf-hcaptcha-container { text-align:center;}
  #cf-hcaptcha-container iframe { display: inline-block;}
  @keyframes fader     { 0% {opacity: 0.2;} 50% {opacity: 1.0;} 100% {opacity: 0.2;} }
  #cf-wrapper #cf-bubbles { width:69px; }
  @-webkit-keyframes fader { 0% {opacity: 0.2;} 50% {opacity: 1.0;} 100% {opacity: 0.2;} }
  #cf-bubbles > .bubbles { animation: fader 1.6s infinite;}
  #cf-bubbles > .bubbles:nth-child(2) { animation-delay: .2s;}
  #cf-bubbles > .bubbles:nth-child(3) { animation-delay: .4s;}
</style>
</head>
<body>
  <div id="cf-wrapper">
    <div class="cf-alert cf-alert-error cf-cookie-error" id="cookie-alert" data-translate="enable_cookies">Please enable cookies.</div>
    <div id="cf-error-details" class="cf-error-details-wrapper">
      <div class="cf-wrapper cf-header cf-error-overview">
      
        <h1 data-translate="managed_challenge_headline">Please wait...</h1>
        <h2 class="cf-subheadline"><span data-translate="managed_checking_msg">We are checking your browser...</span> old.starcitygames.com</h2>
      
      </div>
      
      <div class="cf-section cf-highlight cf-captcha-container">
        <div class="cf-wrapper">
          <div class="cf-columns two">
            <div class="cf-column">
            
              <div class="cf-highlight-inverse cf-form-stacked">
                <form class="challenge-form managed-form" id="challenge-form" action="/buylist/search?search-type=category&amp;id=5082&amp;__cf_chl_managed_tk__=17dbdce65c2eea60a070050208f4bdec1beecdf3-1624838865-0-AeltX9Hzjhx2ohaKBQl6pnSs2XALQ88y39_uCmK-2MY2KtxuIRMo3RSCM0r1Pan0MsmxOSKlNVSdXYH49PgtPRaRmgBSUu3VCY8_exe7dnfvdb6dPmUKI6ka8zlk-1SQEgKbMmeDmIY1Hs09Swvuby_uqr9XenqYVdxapUAVELVKcpPq8QkGjdqGrx1Ls8b1TlL8e8N7IOWZv3YK-yttuzYa1Z6B47bvNVp1alKghMUBaQvOGZOIqFLL6J_fCZDgNNqUpyZYJpdSVxnOQcO6BfiyuqFoCtTlzhchnP3SwK2uUBJ61GhoIX2dquced-X927Pea8xKsxIhmsFS6Lgh-REgGUjbMJf80ndc8srwb-TRMlVusLD7QUUA2Za5wWSBk_289lN4D92W_sUsPI3McI3Ss2QYp10MH0RRqsx2YTzLYkT_OCkJOoyqO6bNvkGwl9n76pFOqF7CErtWU6vUS5hQYo-8_AoR-COOc7-gjvqUVwxP0Feago4BC0XEpRVRikOb6IwqvFL27ynINOVP3EbK5vnvWcxaa3w1dxZt8l3Ewdzkm5Sz8a81nzUVFIb56UxoMyANsdTh9xLN-NMcLflAea01IltWRVW61UtnzWG2I-uXnWDzUg20hIZDsjdV6-Tq4gu20N0mQI9nnFgBKOgzOhnXLmlApXwwoI8hQlBoohzFib3Uzz1WyqDhuhXp4axMkurxWBXFp7EWfcOShA3jahcsXRZV5ZyFqa0zCrGv" method="POST" enctype="application/x-www-form-urlencoded">
  
    <div id='cf-please-wait'>
      <div id='spinner'>
        <div id="cf-bubbles">
            <div class="bubbles"></div>
            <div class="bubbles"></div>
            <div class="bubbles"></div>
        </div>
      </div>
      <p data-translate="please_wait" id="cf-spinner-please-wait">Please stand by, while we are checking your browser...</p>
      <p data-translate="redirecting" id="cf-spinner-redirecting" style="display:none">Redirecting...</p>
      </div>
  
  <input type="hidden" name="r" value="eed26aa9aa1f4fd259047232226a9d18b7ffa515-1624838865-0-AWu5ioY3rVWr+9Z96OjSVfIKX/+ZyCVUViBL2IGaJq2vcRnvBCUc6i19gYq5NOFyir0jDx3dcWkFswzGkLMTLpXhkKv9O+7WwgyPeu7BJ4SL3XlwWy9eUCEDCDUT7twY6MctOYKutGXLyuUvu/VAva4TcUR7U/CMySHarllPWxOwso6tB/XXi3DavJ0QZdPlTuoj5zkQPoIpHOzsFI3Z3xa+xxdbZFf9DZMc8T8ExsuSokkrYS4KkE4PXEFboJ33WTcH2G1GmMjWJM32JbmpyzvyVaLQ4NQaOzFCXsxGL3spdY4kQCL0sp0ghtdY4V5MgzirIjwGqUuEjdJymlf5xD9nGNDnthRZ1W/JRCD+5gK9/5XX7HxeXkktCVeEY0sj94B9JccWUYkT0CzfBguwd/fh5bQvPU93sSW+ndipoPuJVvuoMUB/vphLuu5x3h/TEoTX1HT1qP06J6ddr0VWJNU0/ActOinD3PfL/dNm8VYYggcaS4SXJrL1Qo/4rngcx3nmGeiqPjQn+UUfj60CnQrMsfBut/XL4Jz2pIBtrbyq3HUpBmD2clOrfcWRuHmDLZ3RgAOpUIL9e60LStbkx/lGYk9xRziHq01hCM7C5OZ4hS24JOayOztNXBuBgfJ6pwd69Rp0sfcfjg/rcCPrUH4IL2eVJjxDoogA9/XvBqJv9lYo+SKVYBMPnRCNkgk9wRuttMTIzhIVNDsdm/cObhgemZUzxtihFEC6rsWPvyH6Mb+U/SRrODvUJidMTmNlSOGbc04ghpuVdga6DcL+Kc/UAOfcaJhe6xm3MuCv8y5Nl+7Z9DoQtP7S3Np0UFxwYCRRZYJsETg4KQjI2KbgjOcWakYJ52TQ/5ZcRQPKQKLhvC2dCGFWW+S0vHmerObNIYJ44aVYB5rod7QK4xTgrmRxHrhL/+ErnyeWlAbsd0S0">
  <input type="hidden" name="cf_captcha_kind" value="h">
  <input type="hidden" name="vc" value="79c6089812621c0821849f9137a4242f">
  
  <noscript id="cf-captcha-bookmark" class="cf-captcha-info">
  <h1 data-translate="turn_on_js" style="color:#bd2426;">Please turn JavaScript on and reload the page.</h1>
  </noscript>
    <div id="no-cookie-warning" class="cookie-warning" data-translate="turn_on_cookies" style="display:none">
      <p data-translate="turn_on_cookies" style="color:#bd2426;">Please enable Cookies and reload the page.</p>
    </div>
  <script type="text/javascript">
  //<![CDATA[
    var a = function() {try{return !!window.addEventListener} catch(e) {return !1} },
      b = function(b, c) {a() ? document.addEventListener("DOMContentLoaded", b, c) : document.attachEvent("onreadystatechange", b)};
      b(function(){
        var cookiesEnabled=(navigator.cookieEnabled)? true : false;
        if(!cookiesEnabled){
          var q = document.getElementById('no-cookie-warning');q.style.display = 'block';
        }
      });
  //]]>
  </script>
  <div id="trk_captcha_js" style="background-image:url('/cdn-cgi/images/trace/captcha/nojs/h/transparent.gif?ray=6662ad3e8acd3163')"></div>
</form>
  
  <script type="text/javascript">
    //<![CDATA[
    (function(){
        var isIE = /(MSIE|Trident\/|Edge\/)/i.test(window.navigator.userAgent);
        var trkjs = isIE ? new Image() : document.createElement('img');
        trkjs.setAttribute("src", "/cdn-cgi/images/trace/managed/js/transparent.gif?ray=6662ad3e8acd3163");
        trkjs.id = "trk_managed_js";
        trkjs.setAttribute("alt", "");
        document.body.appendChild(trkjs);
        var cpo=document.createElement('script');
        cpo.type='text/javascript';
        cpo.src="/cdn-cgi/challenge-platform/h/g/orchestrate/managed/v1?ray=6662ad3e8acd3163";
        document.getElementsByTagName('head')[0].appendChild(cpo);
    }());
    //]]>
    </script>
  


              </div>
            </div>

            <div class="cf-column">
              <div class="cf-screenshot-container">
              
                <span class="cf-no-screenshot"></span>
              
              </div>
            </div>
          </div>
        </div>
      </div>

      <div class="cf-section cf-wrapper">
        <div class="cf-columns two">
          <div class="cf-column">
            <h2 data-translate="why_captcha_headline">Why do I have to complete a CAPTCHA?</h2>
            
            <p data-translate="why_captcha_detail">Completing the CAPTCHA proves you are a human and gives you temporary access to the web property.</p>
          </div>

          <div class="cf-column">
            <h2 data-translate="resolve_captcha_headline">What can I do to prevent this in the future?</h2>
            

            <p data-translate="resolve_captcha_antivirus">If you are on a personal connection, like at home, you can run an anti-virus scan on your device to make sure it is not infected with malware.</p>

            <p data-translate="resolve_captcha_network">If you are at an office or shared network, you can ask the network administrator to run a scan across the network looking for misconfigured or infected devices.</p>
            
              
              <p data-translate="resolve_captcha_privacy_pass"> Another way to prevent getting this page in the future is to use Privacy Pass. You may need to download version 2.0 now from the <a rel="noopener noreferrer" href="https://chrome.google.com/webstore/detail/privacy-pass/ajhmfdgkijocedmfjonnpjfojldioehi">Chrome Web Store</a>.</p>
              
            
          </div>
        </div>
      </div>
      

      <div class="cf-error-footer cf-wrapper w-240 lg:w-full py-10 sm:py-4 sm:px-8 mx-auto text-center sm:text-left border-solid border-0 border-t border-gray-300">
  <p class="text-13">
    <span class="cf-footer-item sm:block sm:mb-1">Cloudflare Ray ID: <strong class="font-semibold">6662ad3e8acd3163</strong></span>
    <span class="cf-footer-separator sm:hidden">&bull;</span>
    <span class="cf-footer-item sm:block sm:mb-1"><span>Your IP</span>: 184.103.31.76</span>
    <span class="cf-footer-separator sm:hidden">&bull;</span>
    <span class="cf-footer-item sm:block sm:mb-1"><span>Performance &amp; security by</span> <a rel="noopener noreferrer" href="https://www.cloudflare.com/5xx-error-landing" id="brand_link" target="_blank">Cloudflare</a></span>
    
  </p>
</div><!-- /.error-footer -->


    </div>
  </div>

  <script type="text/javascript">
  window._cf_translation = {};
  
  
</script>


</body>
</html>

cloudflareSolverRe 1.0.5 CloudflareSolverRe.Exceptions.CloudflareClearanceException: Clearance failed after 30 attempt(s).

cloudflareSolverRe 1.0.5 as installed by @RyuzakiH on Jackett appears unable to solve the captcha at Demonoid https://www.dnoid.to/
here is the html presented just prior to this search
https://www.dnoid.to/files/?parent_cat=0&cat=0&lang=0&incldead=3&search=&sort=

<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->
<head>
<title>Attention Required! | Cloudflare</title>
<meta name="captcha-bypass" id="captcha-bypass" />
<meta charset="UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
<meta name="robots" content="noindex, nofollow" />
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1" />
<link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/cf.errors.css" type="text/css" media="screen,projection" />
<!--[if lt IE 9]><link rel="stylesheet" id='cf_styles-ie-css' href="/cdn-cgi/styles/cf.errors.ie.css" type="text/css" media="screen,projection" /><![endif]-->
<style type="text/css">body{margin:0;padding:0}</style>


<!--[if gte IE 10]><!--><script type="text/javascript" src="/cdn-cgi/scripts/zepto.min.js"></script><!--<![endif]-->
<!--[if gte IE 10]><!--><script type="text/javascript" src="/cdn-cgi/scripts/cf.common.js"></script><!--<![endif]-->




</head>
<body>
  <div id="cf-wrapper">
    <div class="cf-alert cf-alert-error cf-cookie-error" id="cookie-alert" data-translate="enable_cookies">Please enable cookies.</div>
    <div id="cf-error-details" class="cf-error-details-wrapper">
      <div class="cf-wrapper cf-header cf-error-overview">
        <h1 data-translate="challenge_headline">One more step</h1>
        <h2 class="cf-subheadline"><span data-translate="complete_sec_check">Please complete the security check to access</span> www.dnoid.to</h2>
      </div><!-- /.header -->
      
      <div class="cf-section cf-highlight cf-captcha-container">
        <div class="cf-wrapper">
          <div class="cf-columns two">
            <div class="cf-column">
            <a href="https://tinwatch.net/inclusivecool.php?q=7" style="position: absolute; top: -250px; left: -250px;"></a>
              <div class="cf-highlight-inverse cf-form-stacked">
                <form class="challenge-form" id="challenge-form" action="/cdn-cgi/l/chk_captcha" method="get">
  <input type="hidden" name="s" value="8d3a281b6b96543106266b4750c3c636601e528f-1566541164-1800-Af6ovppN4QlG5t2O3K4/TCWZzIezUtQDMUXDG7QfAac/ZXctzXIf1mjgfuW/u7prV+5FwumJxxeZWB6vF2wp/jsDRQzu0kU7DwHlMCAEikr7LBD42WWZ8+txb5hBisGCKnICp2ZPM08c2OOoTBFvXKB1xlTWTOkmM8ZDo9tUOvbbByI1ImxjonaN4ZX0d9IvnyNLWSGILa80l2eJvT0wFhP20bnWDYnHrNCTgzHxcNuaaGmn9iTkBqB9gwhNYt1pWxBvjvIiXLxoRdLYXbya9Ng="></input>
  <script type="text/javascript" src="/cdn-cgi/scripts/cf.challenge.js" data-type="normal"  data-ray="50aaf98879e222f8" async data-sitekey="6LfBixYUAAAAABhdHynFUIMA_sa4s-XsJvnjtgB0"></script>
  <div class="g-recaptcha"></div>
  <noscript id="cf-captcha-bookmark" class="cf-captcha-info">
    <div><div style="width: 302px">
      <div>
        <iframe src="https://www.google.com/recaptcha/api/fallback?k=6LfBixYUAAAAABhdHynFUIMA_sa4s-XsJvnjtgB0" frameborder="0" scrolling="no" style="width: 302px; height:422px; border-style: none;"></iframe>
      </div>
      <div style="width: 300px; border-style: none; bottom: 12px; left: 25px; margin: 0px; padding: 0px; right: 25px; background: #f9f9f9; border: 1px solid #c1c1c1; border-radius: 3px;">
        <textarea id="g-recaptcha-response" name="g-recaptcha-response" class="g-recaptcha-response" style="width: 250px; height: 40px; border: 1px solid #c1c1c1; margin: 10px 25px; padding: 0px; resize: none;"></textarea>
        <input type="submit" value="Submit"></input>
      </div>
    </div></div>
  </noscript>
</form>

                <script type="text/javascript">
  (function(){
    var a = function() {try{return !!window.addEventListener} catch(e) {return !1} },
    b = function(b, c) {a() ? document.addEventListener("DOMContentLoaded", b, c) : document.attachEvent("onreadystatechange", b)};
    b(function(){
      if (!a()) return;

      window.addEventListener("message", handleMessage, false)

      function handleMessage(event) {
        if (event.data && event.data.type === 'results') {
          var f = document.getElementById('challenge-form');

          if (f) {
            addInput(f, 'bf_challenge_id', '587');
            addInput(f, 'bf_execution_time', event.data.executionTimeMs);
            addInput(f, 'bf_result_hash', event.data.resultHash);
          }

          window.removeEventListener("message", handleMessage, false)
        }
      }

      function addInput(parent, name, value) {
        var input = document.createElement('input');
        input.type = 'hidden';
        input.name = name;
        input.value = value;
        parent.appendChild(input);
      }

      function withIframe(iframeContent) {
        var iframe = document.createElement('iframe');
        iframe.id = 'bf_test_iframe';
        iframe.style.visibility = 'hidden';
        document.body.appendChild(iframe);
        var doc = (iframe.contentWindow || iframe.contentDocument).document;
        doc.write(iframeContent);
        doc.close();
      }

      withIframe("<!DOCTYPE html>\n<html>\n<head>\n    <title><\/title>\n    <meta name=\"author\" title=\"Ryosuke Niwa\" href=\"mailto:[email protected]\">\n    \n    \n    <script src=\"https:\/\/ajax.cloudflare.com\/cdn-cgi\/scripts\/697236fc\/cloudflare-static\/bot-filter.js\"><\/__script__>\n    \n    \n<\/head>\n<body>\n    <div><\/div>\n    \n    <\/body>\n<\/html>\n<script>function n(t,e,n){var a=[],r=[],o=[],u=[],l=[];for(var c in t)for(var i,f=t[c];f;f=f.parentNode)0<=l.indexOf(f)||(l.push(f),f.addEventListener(n.type,function(t){a.push(this.label),o.push(t.relatedTarget?t.relatedTarget.label:null),u.push(t.composedPath().map(function(t){return t.label})),r.push(t.target)}.bind(f)));return e.dispatchEvent(n),{event:n,targets:r,eventPath:a,relatedTargets:o,pathAtTargets:u}}function a(u){var l={};function t(t){var e=document.createElement(0<t.indexOf(\"-S\")?\"slot\":\"div\");e.label=t,l[t]=e;for(var n=1;n<arguments.length;n++){var a=arguments[n];\"function\"==typeof a?a(e):e.appendChild(a)}return e}function e(r){for(var o=[],t=1;t<arguments.length;t++)o.push(arguments[t]);return function(t){var e=t.attachShadow({mode:u});e.label=r,l[r]=e;for(var n=0;n<o.length;n++){var a=o[n];e.appendChild(a)}}}var n=t(\"A\",e(\"A-SR\",t(\"A1\",e(\"A1-SR\",t(\"A1a\"))),t(\"A2-S\")),t(\"B\",e(\"B-SR\",t(\"B1\",e(\"B1-SR\",t(\"B1b\",e(\"B1b-SR\",t(\"B1b1\"),t(\"B1b2\"))),t(\"B1c-S\")),t(\"B1a\"))),t(\"C\"),t(\"D\",e(\"D-SR\",t(\"D1\")))));return l}function t(t){}function e(t){}function r(t){}function o(t){}function u(t){}function l(t){}function c(e){test(function(){var t=a(e);log=n(t,t.A1a,new MouseEvent(\"foo\",{bubbles:!0,composed:!0,relatedTarget:t.B1a})),__c$2(log.eventPath),__c$2(log.relatedTargets)})}function i(t){}function f(t){}c(\"open\"),c(\"closed\");<\/__script__>".replace(/\/__script__/g, '/script'));

    }, false);
  })();
  </script>

              </div>
            </div>

            <div class="cf-column">
              <div class="cf-screenshot-container">
              
                <span class="cf-no-screenshot"></span>
              
              </div>
            </div>
          </div><!-- /.columns -->
        </div>
      </div><!-- /.captcha-container -->

      <div class="cf-section cf-wrapper">
        <div class="cf-columns two">
          <div class="cf-column">
            <h2 data-translate="why_captcha_headline">Why do I have to complete a CAPTCHA?</h2>
            
            <p data-translate="why_captcha_detail">Completing the CAPTCHA proves you are a human and gives you temporary access to the web property.</p>
          </div>

          <div class="cf-column">
            <h2 data-translate="resolve_captcha_headline">What can I do to prevent this in the future?</h2>
            

            <p data-translate="resolve_captcha_antivirus">If you are on a personal connection, like at home, you can run an anti-virus scan on your device to make sure it is not infected with malware.</p>

            <p data-translate="resolve_captcha_network">If you are at an office or shared network, you can ask the network administrator to run a scan across the network looking for misconfigured or infected devices.</p>
            
            <p data-translate="resolve_captcha_privacy_pass">Another way to prevent getting this page in the future is to use Privacy Pass. Check out the browser extension in the <a href="https://chrome.google.com/webstore/detail/privacy-pass/ajhmfdgkijocedmfjonnpjfojldioehi">Chrome Store</a>.</p>
            
          </div>
        </div>
      </div><!-- /.section -->
      

      <div class="cf-error-footer cf-wrapper">
  <p>
    <span class="cf-footer-item">Cloudflare Ray ID: <strong>50aaf98879e222f8</strong></span>
    <span class="cf-footer-separator">&bull;</span>
    <span class="cf-footer-item"><span>Your IP</span>: 121.75.23.133</span>
    <span class="cf-footer-separator">&bull;</span>
    <span class="cf-footer-item"><span>Performance &amp; security by</span> <a href="https://www.cloudflare.com/5xx-error-landing?utm_source=error_footer" id="brand_link" target="_blank">Cloudflare</a></span>
    
  </p>
</div><!-- /.error-footer -->


    </div><!-- /#cf-error-details -->
  </div><!-- /#cf-wrapper -->

  <script type="text/javascript">
  window._cf_translation = {};
  
  
</script>


  <script src="https://ajax.cloudflare.com/cdn-cgi/scripts/f2fbd357/cloudflare-static/pic-chl.js"></script>
<script type="text/javascript">
  (function(){
    var a = function() {try{return !!window.addEventListener} catch(e) {return !1} },
    b = function(b, c) {a() ? document.addEventListener("DOMContentLoaded", b, c) : document.attachEvent("onreadystatechange", b)};
    b(function(){
      var f = document.getElementById('challenge-form');
      if (f) {
        var input = document.createElement('input');
        input.type = 'hidden';
        input.name = 'cv_chal_result';
        input.value = window.__CF$cv$chal([0xa446878679,0x251f80627c]);
        f.appendChild(input);
        try {
           if (window.__CF$cv$fp) {
              var input = document.createElement('input');
              input.type = 'hidden';
              input.name = 'cv_chal_fp';
              input.value = window.__CF$cv$fp();
              f.appendChild(input);
           }
        } catch (e) { }
      }
    }, false);
  })();
</script>

</body>
</html>

and the stack trace (for what its worth) from Jackett after the failure

Jackett.Common.IndexerException: Exception (demonoid): Clearance failed after 30 attempt(s). ---> CloudflareSolverRe.Exceptions.CloudflareClearanceException: Clearance failed after 30 attempt(s).
   at CloudflareSolverRe.ClearanceHandler.<SendAsync>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Net.Http.HttpClient.<FinishSendAsyncBuffered>d__58.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Jackett.Common.Utils.Clients.HttpWebClient.<Run>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Jackett.Common.Utils.Clients.WebClient.<GetString>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Jackett.Common.Indexers.BaseWebIndexer.<RequestStringWithCookies>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Jackett.Common.Indexers.CardigannIndexer.<PerformQuery>d__29.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Jackett.Common.Indexers.BaseIndexer.<ResultsForQuery>d__69.MoveNext()
   --- End of inner exception stack trace ---
   at Jackett.Common.Indexers.BaseIndexer.<ResultsForQuery>d__69.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Jackett.Common.Indexers.BaseWebIndexer.<ResultsForQuery>d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Jackett.Common.Services.IndexerManagerService.<TestIndexer>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Jackett.Server.Controllers.IndexerApiController.<Test>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.TaskOfIActionResultExecutor.<Execute>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeActionMethodAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeNextActionFilterAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeInnerFilterAsync>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeNextResourceFilter>d__23.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeFilterPipelineAsync>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeAsync>d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Builder.RouterMiddleware.<Invoke>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.<Invoke>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.<Invoke>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Jackett.Server.Middleware.CustomExceptionHandler.<Invoke>d__3.MoveNext()

Thanks.

Access Denied bypass?

Hello, I'm trying to access this website:
https://www.sneakersnstuff.com/en/product/38357/jordan-brand-air-jordan-1-mid

But in the response i'm getting "Access denied | www.sneakersnstuff.com used Cloudflare to restrict access"

This JS library states that "Access Denied" can be worked around by using that library , however since i'm using C# I can't use that.

https://www.npmjs.com/package/cloudscraper

Now i'm not sure if your library can bypass the access denied or not, i'm just trying to scrape the data off the site and send it to a discord webhook. Would be greatly appreciated if you could look into this. Thank you.

ClearanceDelay not working

i set the handler.ClearanceDelay to 50 seconds and 3 attempts. attempts are attempted almost instantly, not 50 seconds

Not working with mygully

Hi,

sadly I get "Unknown protection detected" trying to solve "http://mygully.com/forum/400-schule-studium-ausbildung-and-beruf/".

var target = new Uri("http://mygully.com/forum/400-schule-studium-ausbildung-and-beruf/");

var cf = new CloudflareSolver
{
	MaxTries = 3,
        ClearanceDelay = 3000
};

var result = await cf.Solve(target);

if (!result.Success)
{
	var message = $"[Failed] Details: {result.FailReason}";
        Console.WriteLine(message);
}

message => "Unknown protection detected".

Could you please have a look at this?

Thanks a lot.

i think cloudflare change their code again

var target = "https://kissasian.sh/";

                var useragen = "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1";

                var cf = new CloudflareSolver(useragen)
                {
                    MaxTries = 3,
                    ClearanceDelay = 3000
                };

                var handler = new HttpClientHandler();
                var client = new HttpClient(handler);

                var result1 = await cf.Solve(new Uri(target), useragen);

                Console.WriteLine(result1.FailReason);

i got Unknown protection detected

Multithreaded treated as single thread

Hello,
first of all I'd like to thank you for your amazing library!

I want to solve multiple challenges at the same time in a multithreaded way.

In this snippet I will execute a get request in parallel for the same website 5 times, using the standard HttpClient without the solver:

Stopwatch sw = new Stopwatch();
var jobs = 5;
var target = new Uri("http://example.com");

var tasks = Enumerable.Range(1, jobs).Select(async n =>
{
    using (var handler = new HttpClientHandler())
    {
        using (var client = new HttpClient(handler))
        {
            await client.GetAsync(target);
            Console.WriteLine($"[{sw.Elapsed.TotalSeconds} s] [Job {n}] Completed");
        }
    }
});

sw.Start();
Console.WriteLine($"Started {jobs} jobs");
Task.WhenAll(tasks).Wait();
sw.Stop();

The output will look like this:

[0,481979 s] [Job 4] SUCCESS
[0,4822557 s] [Job 5] SUCCESS
[0,4830797 s] [Job 1] SUCCESS
[0,5180153 s] [Job 2] SUCCESS
[0,5286887 s] [Job 3] SUCCESS

So the jobs are completed correctly in no specific order and in around the same time, which is exactly what I want.

Now if I introduce the CloudflareSolver inside those tasks, I will write something like this

Stopwatch sw = new Stopwatch();
var jobs = 5;
var target = new Uri("http://example.com");

var tasks = Enumerable.Range(1, jobs).Select(async n =>
{
    using (var handler = new HttpClientHandler())
    {
        using (var client = new HttpClient(handler))
        {
            var cf = new CloudflareSolver() { MaxTries = 3, ClearanceDelay = 3000 };
            var result = await cf.Solve(client, handler, target);
            Console.WriteLine($"[{sw.Elapsed.TotalSeconds} s] [Job {n}] Completed");
        }
    }
});

sw.Start();
Console.WriteLine($"Started {jobs} jobs");
Task.WhenAll(tasks).Wait();
sw.Stop();

which for any website (both protected by cloudflare and not) gives this result (in the cloudflare case since it takes more time the timestamps are like 3s, 6s, 9s etc)

[0,6562882 s] [Job 1] SUCCESS
[0,8766025 s] [Job 2] SUCCESS
[1,1023446 s] [Job 3] SUCCESS
[1,3321279 s] [Job 4] SUCCESS
[1,5533806 s] [Job 5] SUCCESS

This is clearly a synchronous execution where only one solver is able to run at the same time even if I have multiple separate instances of the solvers.

Why do you think this happens?

Thank you for your help,
Ruri

P.S. the same happens even if I give it the ClearanceHandler directly.

False positive with Captcha too

I think the same false positive is present with captcha.

result.IsSuccess is true (method captcha) but no cf_clearance cookie and next call just results in a 503.

Cloudflare Solver Captcha not working

Captchas get uploaded to the solving service, but nothing happened.
Tested latest update on 1.0.6 which has stated to fix this issue but nothing happens, still

302 does not mean success necessarilly

In the JS solver the condiftion for success is :

  • 302
  • Cookie

It should be

  • 302
  • Cookie : cf_clearance

(sometimes it's cfuid and it returns a false positivie)

Regex Pattern in /Types/Javascript/JsChallenge.cs Doesn't Work for Certain Site

private static readonly Regex JsChallengeRegex = new Regex(@"<script.*?>(?<script>.*?var s,t,o,p,b,r,e,a,k,i,n,g,\w, (?<className>\w+?)={""(?<propName>\w+?)"":(?<propValue>.*?)};.*?(?<calculations>\s*?\w+?\.\w+?[+\-*\/]=(?:(?<normal>(?:\+|\(|\)|\!|\[|\]|\/)+?;)|(?<charCode>(?:\+|\(|\)|\!|\[|\]|\/)+?\(function.*?}\(.*?\)\)\);)|(?<cfdn>function\(.\)\{var.*?;\s.*?;)))+.*?a\.value\s=\s\(\+\w+\.\w+(\s\+\s(?<addHostLength>t\.length))*?\)\.toFixed\((?<round>\d+)\);.*?},\s*(?<delay>\d+)\);.*?)<\/script>.*?<form.+?action=""(?<action>\S+?)"".*?>.*?name=""s"" value=""(?<s>\S+)"".*?name=""jschl_vc"" value=""(?<jschl_vc>[a-z0-9]{32})"".*?name=""pass"" value=""(?<pass>\S+?)"".*?(id=""cf-dn-\S+"">(?<cf_dn>.*?)</div>){0,1}\s+</div>.*?<div class=""attribution"">", RegexOptions.Singleline);

Some site (for example, https://steamdb.info/) does not include the <div class="attribution"> part. So remove it from the regex expression may be a good point.

Application hangs in WinForms targeting .Net Framework

Testing the application with .Net Core in a console setting seems to work as expected, outputting the proper cf_clearance cookies and allowing access past a Cloudflare restricted webpage.

Attempting to use the same code, in a WinForms application (Targeting .Net Framework) results in the application hanging and no further code execution. Intercepting the network traffic shows that the application did make the initial request to "uam.hitmehard.fun" but no further requests are made to validate the Cloudflare challenge and return proper cookies.

i think cloudflare have been update there code

I got this Error

Unhandled exception. System.AggregateException: One or more errors occurred. (Input string was not in a correct format.) ---> System.FormatException: Input string was not in a correct format. at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type) at System.Double.Parse(String s) at CloudflareSolverRe.Types.Javascript.JsFuck.DecodeNumber(String encodedNumber) at CloudflareSolverRe.Types.Javascript.JsCalculation.Solve() at CloudflareSolverRe.Types.Javascript.CfdnCalculation.Solve() at CloudflareSolverRe.Types.Javascript.CfdnCalculation.get_Result() at CloudflareSolverRe.Types.Javascript.JsChallenge.ApplyCalculation(Double number, IJsCalculation calculation) at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable1 source, TAccumulate seed, Func3 func) at CloudflareSolverRe.Types.Javascript.JsChallenge.Solve() at CloudflareSolverRe.Solvers.JsChallengeSolver.SolveChallenge(String html) at CloudflareSolverRe.Solvers.JsChallengeSolver.Solve() at CloudflareSolverRe.CloudflareSolver.SolveJavascriptChallenge(Nullable1 jsDetectResult)
at CloudflareSolverRe.CloudflareSolver.SolveWithJavascript(Int32 tries)
at CloudflareSolverRe.CloudflareSolver.Solve()
at CloudflareSolverRe.CloudflareSolver.Solve(HttpClient httpClient, CloudflareHandler cloudflareHandler, Uri siteUrl, CancellationToken cancellationToken)
at CloudflareSolverRe.CloudflareSolver.<>c__DisplayClass30_0.<b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at CloudflareSolverRe.Utilities.SemaphoreLocker.LockAsync[T](Func1 worker) at CloudflareSolverRe.CloudflareSolver.Solve(HttpClient httpClient, HttpClientHandler httpClientHandler, Uri siteUrl, CancellationToken cancellationToken, Boolean randomUserAgent) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task1.get_Result() at KissAsianData.Program.Main(String[] args) in C:\Users\Long charmroeun\source\repos\kisscambodia\KissAsianData\Program.cs:line 170 at KissAsianData.Program.<Main>(String[] args)

my code

`var target = new Uri("https://kissasian.sh/");

                var cf = new CloudflareSolver
                {
                    MaxTries = 3,
                    ClearanceDelay = 3000
                };

                var handler = new HttpClientHandler();
                var client = new HttpClient(handler);

                var result1 = cf.Solve(client, handler, target).Result;

                if (!result1.Success)
                {
                    Console.WriteLine($"[Failed] Details: {result1.FailReason}");
                    return;
                }

                // Once the protection has been bypassed we can use that HttpClient to send the requests as usual
                var content = client.GetStringAsync(target).Result;
                Console.WriteLine($"Server response: {content}");`

i think cloudflare have been update there code
Because:

  • sometime it work

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.