claim.trx.auto“Captchas are not active on the site right now.” (OFF)

Auto collect reward on claimtrx.com/faucet, pause for CAPTCHAs, wait 4 minutes after claim before retrying

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         claim.trx.auto“Captchas are not active on the site right now.” (OFF)
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  Auto collect reward on claimtrx.com/faucet, pause for CAPTCHAs, wait 4 minutes after claim before retrying
// @author       👽
// @match        https://claimtrx.com/faucet
// @grant        none
// @license      MIT
// ==/UserScript==

(function () {
    'use strict';

    const collectBtnSelector = 'button.btn.btn-primary.btn-lg.claim-button';
    const captchaInputSelector = 'input[name="cf-turnstile-response"]';
    const iconCaptchaSelector = 'div.iconcaptcha-widget';

    let waiting = false;

    // ✅ Custom log with color
    function logCaptcha(type, detail = '') {
        console.log(`%c[CAPTCHA DETECTED] ${type} ${detail}`, 'color: red; font-weight: bold;');
    }

    // ✅ Check Turnstile (Cloudflare)
    function isTurnstileCaptchaPresent() {
        const input = document.querySelector(captchaInputSelector);
        return input && input.value === '';
    }

    // ✅ Check IconCaptcha
    function isIconCaptchaPresent() {
        return !!document.querySelector(iconCaptchaSelector);
    }

    // ✅ Check for reCAPTCHA, hCaptcha, iframe-based
    function isFrameCaptchaPresent() {
        const iframes = [...document.querySelectorAll('iframe')];
        return iframes.some(iframe =>
            /recaptcha|hcaptcha|captcha|cloudflare/.test(iframe.src)
        );
    }

    // ✅ Check for text-based/image-based CAPTCHA
    function isKeywordCaptchaPresent() {
        const text = document.body.innerText.toLowerCase();
        return [
            "i'm not a robot",
            "select all images",
            "verify you are human",
            "drag the puzzle",
            "enter the characters",
            "complete the challenge"
        ].some(kw => text.includes(kw));
    }

    // ✅ Check all types
    function isAnyCaptchaPresent() {
        if (isTurnstileCaptchaPresent()) {
            logCaptcha("Cloudflare Turnstile");
            return true;
        }
        if (isIconCaptchaPresent()) {
            logCaptcha("IconCaptcha");
            return true;
        }
        if (isFrameCaptchaPresent()) {
            logCaptcha("Iframe-based CAPTCHA");
            return true;
        }
        if (isKeywordCaptchaPresent()) {
            logCaptcha("Text/Image CAPTCHA");
            return true;
        }
        return false;
    }

    // ✅ Try to collect if safe
    function tryClickCollect() {
        if (waiting) {
            console.log('⏳ Waiting before next claim...');
            return;
        }

        if (isAnyCaptchaPresent()) {
            console.log('⚠️ CAPTCHA detected. Pausing auto-claim.');
            return;
        }

        const btn = document.querySelector(collectBtnSelector);
        if (btn && !btn.disabled) {
            console.log('✅ Collect button ready. Claiming now.');
            btn.click();
            waiting = true;
            setTimeout(() => {
                waiting = false;
                console.log('🔄 Ready for next claim.');
            }, 240000); // 4 minutes
        } else {
            console.log('🔍 Collect button not ready.');
        }
    }

    // 🔁 Run every 3 seconds
    setInterval(tryClickCollect, 3000);
})();