Crypto Faucets

Free bitcoin faucet

当前为 2023-03-10 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Crypto Faucets
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  Free bitcoin faucet
// @author       vikiweb
// @match        https://claimtrx.com/*
// @match        https://cryptoearnfaucet.com/offer/*
// @match        https://feyorra.top/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=cryptoearnfaucet.com
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // Register via https://claimtrx.com/?r=561532 and enter your email address and password on line no 25
    // Register via https://feyorra.top/faucet and enter your email address and password on line no 26
    // Enter your email address on line 27 and Go to https://cryptoearnfaucet.com/offer/?r=93

    let sites = [
        {faucetUrl: "https://claimtrx.com/faucet", email: "", password: "", },
        {faucetUrl: "https://feyorra.top/faucet", email: "", password:"",},
        {faucetUrl: "https://cryptoearnfaucet.com/offer/faucet", email: "", password:"",},
    ];

    let autoRotateTimerinMin = 1;

    let sitesMap = [
        {
            websiteUrl:"https://claimtrx.com",
            homePageCheck : ".container .herotext",
            loginSelectors :["#email", "#password"],
            submitFormSelectors : ["form[action*='/verify'] button[type=submit]"],
            imageCaptchaSelector : [".rscapimg", "selectedOption"],
            hasLimit : false,
        },
        {
            websiteUrl:"https://cryptoearnfaucet.com/offer",
            homePageCheck : "#hero h1",
            loginSelectors :["#InputEmail"],
            submitFormSelectors : ["#fauform button[type='submit']", "#fauform input[type='text'].form-control.mb-3"],
            hasLimit : true,
        },
        {
            websiteUrl:"https://feyorra.top",
            homePageCheck : ".container .hero",
            loginSelectors :["#email", "#password"],
            submitFormSelectors : ["form[action*='/verify'] button[type=submit]"],
            imageCaptchaSelector : [".rscapimg", "selectedOption"],
            hasLimit : false,
        },
    ]

    function movetonext() {
        if (currentIndex === sites.length - 1) {
            currentIndex = 0;
            console.log("All sites visited. Starting from 0 again.");
        } else {
            currentIndex++;
        }
        window.location.href = sites[currentIndex].faucetUrl;
    }

    // Check if captcha is checked
    function isCaptchaChecked() {
        return grecaptcha && grecaptcha.getResponse().length !== 0;
    }

    function visibleCheck(elm) {
        if(!elm.offsetHeight && !elm.offsetWidth) { return false; }
        if(getComputedStyle(elm).visibility === 'hidden') { return false; }
        return true;
    }

    let check_address = window.location.origin;
    let currentFaucetUrl = new URL(window.location.href);
    let currentOrigin = currentFaucetUrl.origin;
    let currentIndex = sites.findIndex(site => site.faucetUrl.includes(currentOrigin));
    let websiteIndex = sitesMap.findIndex(website => website.websiteUrl.includes(currentOrigin));

    function processSite(site) {

        if(window.location.href.includes(check_address) && document.querySelector(sitesMap[websiteIndex].homePageCheck)){
            window.location.replace(sitesMap[websiteIndex].websiteUrl +'/login');
        }

        if (window.location.href.includes(sitesMap[websiteIndex].websiteUrl +'/login')) {
            setInterval(function() {
                if (document.querySelector(sitesMap[websiteIndex].loginSelectors[0])) {
                    document.querySelector(sitesMap[websiteIndex].loginSelectors[0]).value = site.email;
                }
                if (document.querySelector(sitesMap[websiteIndex].loginSelectors[1])) {
                    document.querySelector(sitesMap[websiteIndex].loginSelectors[1]).value = site.password;
                }

                if(!sitesMap[websiteIndex].loginImageCapatha){
                    if (document.querySelector("button[type='submit']")) {
                        document.querySelector("button[type='submit']").click();
                    }
                }else{
                    document.querySelectorAll(sitesMap[websiteIndex].imageCaptchaSelector[0]).forEach(function(img) {
                        if (img.classList.contains(sitesMap[websiteIndex].imageCaptchaSelector[1])) {
                            // Do something if the element has the selectedOption class
                            console.log("Image is selected!");
                            document.querySelector("button[type='submit']").click();
                        } else {
                            // Do something if the element does not have the selectedOption class
                            console.log("Image is not selected!");
                        }
                    });
                }

            }, 6000);
        }

        if (window.location.href.includes(sitesMap[websiteIndex].websiteUrl +'/dashboard')) {
            window.location.replace(sitesMap[websiteIndex].websiteUrl +'/faucet');
        }

        if(window.location.href.includes(sitesMap[websiteIndex].websiteUrl +'/faucet')){

            setInterval(function(){

                if(!sitesMap[websiteIndex].imageCaptchaSelector){
                    if(document.querySelector(sitesMap[websiteIndex].submitFormSelectors[0]) && document.querySelector(sitesMap[websiteIndex].submitFormSelectors[1]).value != ""){
                        document.querySelector(sitesMap[websiteIndex].submitFormSelectors[0]).click();
                    }
                }else{
                    document.querySelectorAll(sitesMap[websiteIndex].imageCaptchaSelector[0]).forEach(function(img) {
                        if (img.classList.contains(sitesMap[websiteIndex].imageCaptchaSelector[1])) {
                            // Do something if the element has the selectedOption class
                            console.log("Image is selected!");
                            document.querySelector(sitesMap[websiteIndex].submitFormSelectors[0]).click();
                        } else {
                            // Do something if the element does not have the selectedOption class
                            console.log("Image is not selected!");
                        }
                    });
                }

                if(document.querySelector(".swal2-shown .swal2-popup .swal2-confirm")){
                    document.querySelector(".swal2-shown .swal2-popup .swal2-confirm").click();
                }

                if(document.querySelector(".next-button .btn.btn-primary") && visibleCheck(document.querySelector(".next-button .btn.btn-primary"))){
                    document.querySelector(".next-button .btn.btn-primary").click();
                }

                let string = document.querySelector("#Claim > div.text-center.mb-3 > div.row > div.text-primary.col > p:nth-child(1)");
                if(string){
                    let parts = string.innerText.split("/");
                    if (parts[0] === "0") {
                        console.log("The first value is 0.");
                        window.location.replace(sitesMap[websiteIndex].websiteUrl +'/auto');
                    } else {
                        console.log("The first value is not 0.");
                    }
                }

            }, 10000)

            setInterval(function(){

                if(!document.querySelector(sitesMap[websiteIndex].submitFormSelectors[0])){
                    movetonext()
                }

            }, autoRotateTimerinMin * 60000)
        }

        if(window.location.href.includes(sitesMap[websiteIndex].websiteUrl + '/auto')){
            setInterval(function(){
                if(document.querySelector(".swal2-shown .swal2-popup .swal2-confirm")){
                    document.querySelector(".swal2-shown .swal2-popup .swal2-confirm").click();
                }
            }, 10000)
        }
    }

    // Start processing the first site
    processSite(sites[currentIndex]);

})();