Auto login, auto emoji captcha, auto claim reward
目前為
// ==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);
})();