RyuzakiH/CloudflareSolverRe

i think cloudflare have been update there code

longcharmroeun opened this issue · 5 comments

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

I have verified that #18 works well and is able to resolve this issue

thank you @RyuzakiH
It work perfectly.

I have verified that #18 works well and is able to resolve this issue

Is it ok? Today i recive "Unknown protection detected" always.

yes, is it

I'm receiving "Unknown protection detected" every time today for a different site, and I have merged the pull request. Anyone else?