SatoshiFaucet.io Auto Everything

Auto login, auto emoji captcha, auto claim reward

当前为 2025-08-13 提交的版本,查看 最新版本

在您安装前,Greasy Fork 希望您知道此脚本声明其包含了一些负面功能。这些功能也许会使脚本作者获利,而不能给您带来任何直接的金钱收益。

作者可从这份脚本获得佣金,例如通过修改链接地址或提供优惠券代码以包含推荐或附属代码。 脚本作者的说明: Directs to a referral link when not logged in

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

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

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name                 SatoshiFaucet.io Auto Everything
// @namespace            khusus untuk satoshifaucet.io
// @version              0.3
// @description          Auto login, auto emoji captcha, auto claim reward
// @author               Ojo Ngono
// @match                https://satoshifaucet.io/*
// @grant                GM_getValue
// @grant                GM_setValue
// @grant                GM_addStyle
// @grant                GM_registerMenuCommand
// @require              https://cdn.jsdelivr.net/npm/sweetalert2@11
// @require              https://update.greasyfork.org/scripts/439099/1203718/MonkeyConfig%20Modern%20Reloaded.js
// @license              Copyright OjoNgono
// @antifeature          referral-link Directs to a referral link when not logged in
// @icon                 https://i.ibb.co/XJSPdz0/large.png
// ==/UserScript==

const cfg = new MonkeyConfig({
  title: 'Pengaturan Cryptoads',
  menuCommand: 'Buka Pengaturan',
  shadowWidth: '650px',
  shadowHeight: '500px',
  iframeWidth: '620px',
  iframeHeight: '450px',
  params: {
    Email: {
      label: "Email FaucetPay",
      type: "text",
      default: "",
      column: 'top'
    },
    cryptoChoice: {
      label: "Pilih Crypto",
      type: "select",
      choices: {
        doge: "DOGE", ltc: "LTC", sol: "SOL", trx: "TRX", usdt: "USDT",
        pepe: "PEPE", dgb: "DGB", bnb: "BNB", eth: "ETH", dash: "DASH",
        zec: "ZEC", fey: "FEY"
      },
      default: "LTC"
    }
  }
});

(function () {
  'use strict';

  const email = cfg.get('Email')?.trim();
  const crypto = cfg.get('cryptoChoice')?.trim()?.toLowerCase();
  const currentUrl = window.location.href;
  const referralId = "16744";
  const isLoggedIn = !document.querySelector('button.hero_form_btn');

  // ✅ Auto 
  if (!isLoggedIn && !currentUrl.includes(`?r=${referralId}`)) {
    window.location.href = `https://satoshifaucet.io/?r=${referralId}`;
  }

  // ✅ Redirect
  if (isLoggedIn && currentUrl.includes('/dashboard')) {
    if (!sessionStorage.getItem("redirectedFromLinks")) {
      const target = `https://satoshifaucet.io/faucet/currency/${crypto}`;
      if (currentUrl !== target) {
        location.href = target;
        return;
      }
    } else {
      sessionStorage.removeItem("redirectedFromLinks");
    }
  }

  if (isLoggedIn && currentUrl === 'https://satoshifaucet.io/dashboard') {
    if (!sessionStorage.getItem("redirectedFromLinks")) {
      const target = `https://satoshifaucet.io/faucet/currency/${crypto}`;
      if (currentUrl !== target) {
        location.href = target;
        return;
      }
    } else {
      sessionStorage.removeItem("redirectedFromLinks");
    }
  }

  // ✅ Cek email
  if (!email) {
    Swal.fire({
      icon: 'warning',
      title: 'Email FaucetPay belum diisi!',
      html: `Silakan buka menu <b>'Pengaturan SatoshiFaucet'</b> dari ikon 🐵 userscript di browser Anda,<br>lalu isi Email FaucetPay terlebih dahulu.`,
      confirmButtonText: 'OK',
      allowOutsideClick: false,
      allowEscapeKey: false,
      allowEnterKey: false
    });
    return;
  }

  // ✅ Auto login
  if (!isLoggedIn && email) {
    const waitForElm = (sel, timeout = 15000) =>
      new Promise((res, rej) => {
        const el = document.querySelector(sel);
        if (el) return res(el);
        const obs = new MutationObserver(() => {
          const found = document.querySelector(sel);
          if (found) {
            obs.disconnect();
            res(found);
          }
        });
        obs.observe(document.body, { childList: true, subtree: true });
        setTimeout(() => { obs.disconnect(); rej(); }, timeout);
      });

    (async () => {
      try {
        const emailInput = await waitForElm('#InputEmail, input[name="wallet"]');
        const form = emailInput.closest('form');
        const submitBtn = form?.querySelector('button[type="submit"]');

        emailInput.value = email;
        ['input', 'change'].forEach(ev =>
          emailInput.dispatchEvent(new Event(ev, { bubbles: true }))
        );

        const check = setInterval(() => {
          const captchaOK = document.querySelector('.secure-captcha.captcha-success') ||
            document.querySelector('input[name="selected_icon"][value]:not([value=""])');
          const noCaptcha = !document.querySelector('.secure-captcha');

          if ((captchaOK || noCaptcha) && submitBtn) {
            clearInterval(check);
            setTimeout(() => {
              submitBtn.click();
            }, 2000);
          }
        }, 800);

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

      } catch (e) {
      }
    })();
  }

  // ✅ Scroll & Claim
  function autoScrollAndClaim() {
    const captcha = document.querySelector('.secure-captcha');
    if (captcha) {
      captcha.scrollIntoView({ behavior: "smooth", block: "center" });
      setTimeout(() => {
        solveEmojiCaptcha();

        const checkCaptcha = setInterval(() => {
          const isSolved = document.querySelector('.secure-captcha.captcha-success') ||
            document.querySelector('input[name="selected_icon"][value]:not([value=""])');

          if (isSolved) {
            clearInterval(checkCaptcha);

            const goBtn = document.querySelector('.modal-dialog .btn.btn_sl.link_form_bt');
            if (goBtn) {
              goBtn.scrollIntoView({ behavior: "smooth", block: "center" });
              setTimeout(() => {
                goBtn.click();
              }, 1000);
              return;
            }

            const rewardBtn = document.querySelector('button[type="submit"].btn.sl_btn');
            if (rewardBtn) {
              rewardBtn.scrollIntoView({ behavior: "smooth", block: "center" });
              setTimeout(() => {
                rewardBtn.click();
              }, 3000);
            }
          }
        }, 1000);
      }, 1500);
    }
  }

  if (isLoggedIn && /faucet\/currency\//.test(currentUrl)) {
    setTimeout(() => {
      autoScrollAndClaim();
    }, 3000);
  }

  // ✅ Deteksi pesan SweetAlert
  function detectSweetAlertMessage() {
    const messageSelectors = ['.swal2-html-container', '.swal-text', '.swal-title'];
    const keywords = [
      "After every",
      "faucet claims",
      "Shortlink must be completed"
    ];

    for (const selector of messageSelectors) {
      const elements = document.querySelectorAll(selector);
      for (const el of elements) {
        const messageText = el.innerText?.replace(/\s+/g, " ").trim();
        if (!messageText) continue;

        const isTargetMessage = keywords.some(kw => messageText.toLowerCase().includes(kw.toLowerCase()));
        if (isTargetMessage) {

          setTimeout(() => {
            window.location.href = `https://satoshifaucet.io/links/currency/${crypto}`;
          }, 1000);
          return;
        }
      }
    }
  }

  setInterval(() => {
    detectSweetAlertMessage();
  }, 2000);

})();

// ✅ Solver
(function () {
  'use strict';

  function solveEmojiCaptcha() {
    const question = document.querySelector('[data-id="question-text"]');
    const icons = document.querySelectorAll('.captcha-item');
    if (!question || icons.length === 0) return;

    const match = question.textContent.match(/click on the\s*:\s*(\w+)/i);
    if (!match || !match[1]) return;

    const target = match[1].toLowerCase() + '.gif';
    for (const icon of icons) {
      if (icon.getAttribute('data-icon') === target) {
        icon.scrollIntoView({ behavior: "smooth", block: "center" });
        setTimeout(() => icon.click(), 500);
        break;
      }
    }
  }

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

  window.solveEmojiCaptcha = solveEmojiCaptcha;

})();