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

Verify on server side #17

Open
dunghy7 opened this issue Sep 21, 2023 · 1 comment
Open

Verify on server side #17

dunghy7 opened this issue Sep 21, 2023 · 1 comment

Comments

@dunghy7
Copy link

dunghy7 commented Sep 21, 2023

public bool Verify([FromBody] List<string> datas)
        {
            var value = JsonConvert.DeserializeObject<List<int>>(datas[0]);
            var sum = value.Sum();
            var avg = sum * 1.0 / value.Count;
            var stddev = value.Select(v => Math.Pow(v - avg, 2)).Sum() / value.Count;
            return stddev != 0;
        }

When slide image successful or unsuccessful, always return the number greater than 0

@jcmichot
Copy link

jcmichot commented Nov 10, 2023

I confirm, same with javascript inside _proto.verify = function ()

        var sum = function (x, y) { return x + y; };
        var square = function (x) { return x * x; };
        var average = arr.reduce(sum) / arr.length;
        var deviations = arr.map(function (x) { return x - average; });
        var stddev = Math.sqrt(deviations.map(square).reduce(sum) / arr.length);
        verified = stddev !== 0

"verified" is always TRUE.
Only javascript "spliced: Math.abs(left - this.x) < this.options.offset" is usefull to confirm valid captcha.

That's a nice captcha but need to be secure with real server side feature.

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

2 participants