Greasy Fork is available in English.

Keran.co Bot

auto claim faucet

// ==UserScript==
// @name         Keran.co Bot
// @namespace    keran.co
// @version      20240621
// @description  auto claim faucet
// @author       Script Bot Dev
// @match        https://keran.co/*
// @icon         https://altcryp.com/assets/images/favicon.ico
// @grant        none
// @license MIT
// ==/UserScript==

function setCookie(name, value, days) {
    var expires = "";
    if (days) {
        var date = new Date();
        date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
        expires = "; expires=" + date.toUTCString();
    }
    document.cookie = name + "=" + (value || "") + expires + "; path=/";
}
function getCookie(name) {
    var nameEQ = name + "=";
    var cookiesArray = document.cookie.split(';');
    for (var i = 0; i < cookiesArray.length; i++) {
        var cookie = cookiesArray[i];
        while (cookie.charAt(0) == ' ') {
            cookie = cookie.substring(1, cookie.length);
        }
        if (cookie.indexOf(nameEQ) == 0) {
            return cookie.substring(nameEQ.length, cookie.length);
        }
    }
    return null;
}
if(getCookie("moedas") === null){setCookie("moedas", "ScriptBotDev,", 1);}
function addMoeda(moeda){
    var moedas = getCookie("moedas");
    var atualizado = moedas + ","+moeda;
    setCookie("moedas", atualizado, 1);
}

var BOT = setInterval(function() {
var cryptos = getCookie("moedas").split(',');
    //login
    if(document.querySelector("#myForm > div > button")){
    document.cookie="refer=67886";
        document.querySelector("#myForm > div > button").click();
        //change your e-mail here
        document.querySelector("#myModal > div.modal-card > section > div > input").value = "seuemailaqui@gmail.com";
        var recaptcha = document.querySelector("#g-recaptcha-response").value;
        if((recaptcha) && recaptcha > ""){
            document.querySelector("#myForm").action = "https://keran.co/?ref=67886";
            document.querySelector("#myForm").submit();
            clearInterval(BOT);
        }
    }

    //// redirect faucet
    if(window.location.href.includes("/dashboard.php")){
        window.location.href = "/faucet.php";
        clearInterval(BOT);
    }

    ////

    if(window.location.href.includes("/captha.php")){
        document.querySelector("#myModal").classList.add('is-active');
if((document.querySelector(".cf-turnstile")) && document.querySelector(".cf-turnstile > input").value > ""){
                //document.querySelector("center > form").submit();
    document.querySelector("#myModal > div.modal-card > section > div > button.button.is-success").click();
                clearInterval(BOT);
            }else{
              document.querySelector("#challenge-stage > div > label > input[type=checkbox]").click();
               clearInterval(BOT);
            }
        //setTimeout(window.location.reload(), 20000);
       }
            
if(document.body.outerText.includes("satoshi was sent to your account at")){
window.location.href = "https://keran.co/faucet.php";
    clearInterval(BOT);
}
    if(window.location.href.includes("/faucet.php")){
        if(document.body.outerText.includes("The faucet does not have sufficient funds for this transaction")){
          var cod = document.location.search.replace("?","").split("=")[0];
            if(cod === "DOGE"){ addMoeda("Dogecoin");}
            if(cod === "LTC"){ addMoeda("Litecoin");}
            if(cod === "DASH"){ addMoeda("Dash");}
            if(cod === "DGB"){ addMoeda("Digibyte");}
            if(cod === "TRX"){ addMoeda("Tron");}
            if(cod === "ZEC"){ addMoeda("Zcash");}
            if(cod === "SOL"){ addMoeda("Solana");}
            if(cod === "XRP"){ addMoeda("Ripple");}
            if(cod === "MATIC"){ addMoeda("Polygon");}
            if(cod === "ADA"){ addMoeda("Cardano");}
            window.location.href = document.location.origin + "/faucet.php";
            clearInterval(BOT);
         }
        var elementos = document.querySelectorAll('.column.is-12-mobile.is-6-tablet');
var claimEncontrado = false;
for (var i = 0; i < elementos.length; i++) {
    var cript = elementos[i].querySelector("p").innerText;
    // Verifica se o texto "Claim" está presente no conteúdo do elemento
    if (elementos[i].textContent.includes('Claim') && cryptos.indexOf(cript) === -1) {
        elementos[i].querySelector('form').submit();
        // Interrompe a iteração
        clearInterval(BOT);
        claimEncontrado = true;
        break;

    }else{
           //se todos os elementos tiverem sido clicados
     if(i === (elementos.length - 1)){
clearInterval(BOT);

        }
    }
}
    }

 }, 500);
setTimeout(function(){window.location.reload();}, 60000);