Ucaptcha Solver

Auto Solve uCaptcha challenges

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

You will need to install an extension such as Tampermonkey to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name           Ucaptcha Solver
// @namespace      Ucaptcha Auto Solver
// @version        1.2
// @description    Auto Solve uCaptcha challenges
// @author         Shnethan
// @match          https://litoshipay.com/*
// @grant          none
// @license        © Shnethan (2026)
// @run-at         document-end

// ==/UserScript==

        /*
                   * Copyright (c) 2026 Shnethan . All rights reserved.
         */
 

(function () {

    'use strict';

    const w = ms => new Promise(r => setTimeout(r, ms));
    let u, t = null; //

    const r = () => {
        if (t) clearTimeout(t);
        t = setTimeout(() => s(true), 10000);
    };

    const f = () => {
        const c = u?.querySelector('input[data-uc-checkbox]');
        if (c) {
            if (c.checked) c.click();
            ['mousedown', 'mouseup', 'change'].forEach(e =>
                c.dispatchEvent(new Event(e, { bubbles: true }))
            );
            setTimeout(s, 3000);
        }
    };

    const h = async () => {
        const i = window.UCaptchaPos?.filter(p => p.flipped) || [];
        const b = u?.querySelector('div[data-uc-show]')?.getBoundingClientRect();
        if (!i.length || !b) return;

        for (const p of i) {
            const x = b.left + p.x + 20, y = b.top + p.y + 20;
            const e = document.elementFromPoint(x, y);
            if (e) {
                ['mousedown', 'mouseup', 'click'].forEach(evt =>
                    e.dispatchEvent(new MouseEvent(evt, { clientX: x, clientY: y, bubbles: true }))
                );
            }
            await w(400);
        }
    };

    const s = async (rf = false) => {
        u = document.querySelector('div[data-ucaptcha="widget"]');
        if (!u) return;
        if (rf) return f();
        r();

        const c = u.querySelector('input[data-uc-checkbox]');
        if (c && !c.checked) c.click();
        await w(3000);
        h();
    };

    document.readyState === 'loading'
        ? document.addEventListener('DOMContentLoaded', () => s())
        : s();

    new MutationObserver(() => s()).observe(document.body, { childList: true, subtree: true });
})();