RyuzakiH / CloudflareSolverRe

Cloudflare Javascript & reCaptcha challenge (I'm Under Attack Mode or IUAM) solving / bypass .NET Standard library.
MIT License
179 stars 49 forks source link

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

Open mattia-git opened 4 years ago

mattia-git commented 4 years ago

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}");
                }`
duartejbrito commented 4 years ago

Some here, for https://yts.unblockit.one/

ngosang commented 4 years ago

I tested both URLs with #29 and they work well.