Moon Captcha v2 Solver

Moon Captcha Captcha Solver by @satology @vikiweb @stealtosvra.

Stan na 16-04-2023. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name        Moon Captcha v2 Solver
// @namespace   moon.captcha.v2.solver
// @version     0.6
// @description Moon Captcha Captcha Solver by @satology @vikiweb @stealtosvra.
// @author      stealtosvra
// @match       https://coinpayz.xyz/*
// @match       https://bits.re/*
// @match       https://claimtrx.com/*
// @match       https://dogepool.com/*
// @match       https://coinpot.in/*
// @match       https://feyorra.top/*
// @resource    hashes https://stealtosvra.github.io/udImages/hashes32.json
// @require     https://unpkg.com/[email protected]/browser/lib/jimp.min.js
// @icon        https://stealtosvra.github.io/udImages/udp.png
// @grant       GM_getResourceText
// @license     MIT
// ==/UserScript==

(function () {
    'use strict';

    const captchaImgs = document.querySelectorAll('.rscapimg, .captchaOptions');
    const hashes = JSON.parse(GM_getResourceText('hashes'));

    function readAsPng(base64Src) {
        return new Promise(resolve => {
            const base64Data = base64Src.replace(/^data:image\/png;base64,/, '');
            const buffer = Buffer.from(base64Data, 'base64');
            Jimp.read(buffer, (err, image) => {
                resolve(image);
            });
        });
    }

    async function checkImages() {
        const promises = Array.from(captchaImgs).map(async (img, i) => {
            const image = await readAsPng(img.src);
            const hash = image.hash(32);
            console.log(`IMG Hash : ${i}: ${hash}`);
            const resp = hashes.filter(x => x === hash);
            if (resp.length > 0) {
                console.log(`Matched Hash : ${i}! ${resp}`);
                img.click()
            } else {
                console.log(`Not Upside Down! ${i}!`);
            }
        });
        await Promise.all(promises);
        console.log('end');
        setTimeout(function(){
        document.querySelector("button[type='submit']").click();}, 20000);}
    

    checkImages();
})();