SatoshiFaucet.io Auto Everything

Auto login, auto emoji captcha, auto claim reward

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name                 SatoshiFaucet.io Auto Everything
// @namespace            khusus untuk satoshifaucet.io
// @version              0.1
// @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 isLoggedIn = !!document.querySelector('a[href="https://satoshifaucet.io/referrals"]');
  const referralId = "16744";

  // ✅ 
  if (!isLoggedIn && !currentUrl.includes(`?r=${referralId}`)) {
    console.log("🚪 Belum login, redirect ke referral...");
    window.location.href = `https://satoshifaucet.io/?r=${referralId}`;
    return; 
  }

 // ✅ 
if (isLoggedIn && currentUrl.includes('/dashboard')) {
  if (!sessionStorage.getItem("redirectedFromLinks")) {
    const target = `https://satoshifaucet.io/faucet/currency/${crypto}`;
    if (currentUrl !== target) {
      console.log(`🔀 Redirect ke halaman faucet: ${crypto.toUpperCase()}`);
      location.href = target;
      return;
    }
  } else {
    console.log("🛑 Tidak redirect ke faucet karena baru saja dialihkan ke links.");
    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) {
      console.log(`🔀 Redirect ke halaman faucet: ${crypto.toUpperCase()}`);
      location.href = target;
      return;
    }
  } else {
    console.log("🛑 Tidak redirect ke faucet karena baru saja dialihkan ke links.");
    sessionStorage.removeItem("redirectedFromLinks");
  }
}
  if (!email) {
    Swal.fire({
      icon: 'warning',
      title: 'Email FaucetPay belum diisi!',
      html: `Silakan buka menu <b>'Pengaturan Cryptoads'</b> dari ikon 🐵 userscript di browser Anda,<br>lalu isi Email FaucetPay terlebih dahulu.`,
      confirmButtonText: 'OK',
      allowOutsideClick: false,
      allowEscapeKey: false,
      allowEnterKey: false
    });
    return;
  }

  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);
            console.log("🕒 Captcha selesai, menunggu 2 detik sebelum klik submit...");
            setTimeout(() => {
              submitBtn.click();
              console.log("✅ Tombol submit diklik setelah jeda 2 detik");
            }, 2000);
          }
        }, 800);

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

      } catch (e) {
        console.error("❌ Gagal saat login otomatis:", e);
      }
    })();
  }

  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) {
        console.log(`🧠 Klik ikon captcha: ${target}`);
        icon.scrollIntoView({ behavior: "smooth", block: "center" });
        setTimeout(() => icon.click(), 500);
        break;
      }
    }
  }

  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);
            console.log("✅ Captcha selesai. Scroll ke tombol klaim...");

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

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

  // ✅ 
  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) {
          console.log("⚠️ Terdeteksi pesan SweetAlert:");
          console.log(`📩 Pesan: ${messageText}`);
          setTimeout(() => {
            window.location.href = `https://satoshifaucet.io/links/currency/${crypto}`;
          }, 1000);
          return;
        }
      }
    }
  }
  
  setInterval(() => {
    detectSweetAlertMessage();
  }, 2000);

})();