Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mattia-git opened this issue Apr 9, 2020 · 2 comments

Comments

@mattia-git
Copy link

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}");
                }`
@mattia-git mattia-git changed the title Javascript challenge fails solving "Input string was not in a correct format." Javascript challenge throws exception "Input string was not in a correct format." Apr 9, 2020
@duartejbrito
Copy link

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

@ngosang
Copy link
Contributor

ngosang commented May 26, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants