// ==UserScript== // @name [Premium] Faucetpay ReCaptcha/Antibot Rotator // @namespace https://greasyfork.org/users/1162863 // @version 1.0 // @description Automates form filling and button clicking on Faucetpay Faucet websites, with ReCaptcha/Antibot waiting. // @author Andrewblood // @match https://sollcrypto.com/home/page/* // @match https://cryptoclaps.com/earn/* // @match https://baltoniearn.com/claim/* // @match https://vptron.online/TRX/* // @match https://claimcoins.site/reward/* // @icon https://www.google.com/s2/favicons?sz=64&domain=faucetpay.io // @grant GM_setValue // @grant GM_getValue // @grant GM_deleteValue // @antifeature referral-code // @license Andrewblood // @downloadURL none // ==/UserScript== /* Automates form filling and button clicking on Faucetpay Faucet websites, with ReCaptcha/Antibot handling. Features: - Automatically fills and clicks buttons on supported Faucetpay Faucet websites. - If the claim is done, it redirects to the next supported Faucet URL. - Saves empty pages with timestamps to prevent revisiting within 6 hours. - Provides an overlay for managing saved pages, clearing stored pages, displaying them, and saving Faucetpay email. */ (function() { 'use strict'; // Function to click a button function clickButton(selector) { var button = document.querySelector(selector); if (button) { button.click(); } } // Function to check if an element is visible function isElementVisible(selector) { var element = document.querySelector(selector); return element && element.offsetWidth > 0 && element.offsetHeight > 0; } // Email overlay creation var overlay = document.createElement('div'); overlay.id = 'emailInputOverlay'; overlay.style.position = 'fixed'; overlay.style.bottom = '10px'; overlay.style.right = '10px'; overlay.style.zIndex = '10000'; // Create a button to clear stored URLs var clearStoredUrlsButton = document.createElement('button'); clearStoredUrlsButton.id = 'clearStoredUrlsButton'; clearStoredUrlsButton.style.padding = '5px'; clearStoredUrlsButton.style.marginLeft = '5px'; clearStoredUrlsButton.textContent = 'Clear Stored Pages'; // Add an event listener for the new button clearStoredUrlsButton.addEventListener('click', function() { // Clear stored pages GM_deleteValue('storedUrls'); console.log('Stored pages have been cleared.'); }); // Create a button to show stored URLs var showStoredUrlsButton = document.createElement('button'); showStoredUrlsButton.id = 'showStoredUrlsButton'; showStoredUrlsButton.style.padding = '5px'; showStoredUrlsButton.style.marginLeft = '5px'; showStoredUrlsButton.textContent = 'Show Stored Pages'; // Add an event listener for the new button showStoredUrlsButton.addEventListener('click', function() { // Display stored pages as an alert var storedUrls = GM_getValue('storedUrls', []); console.log('Stored Pages:\n\n' + JSON.stringify(storedUrls, null, 2)); }); // Create an email input field var emailInput = document.createElement('input'); emailInput.type = 'text'; emailInput.id = 'emailInput'; emailInput.placeholder = 'Faucetpay Email'; emailInput.style.padding = '5px'; // Create a save email button var saveEmailButton = document.createElement('button'); saveEmailButton.id = 'saveEmailButton'; saveEmailButton.style.padding = '5px'; saveEmailButton.style.marginLeft = '5px'; saveEmailButton.textContent = 'Save'; // Add elements to the overlay overlay.appendChild(clearStoredUrlsButton); overlay.appendChild(showStoredUrlsButton); overlay.appendChild(emailInput); overlay.appendChild(saveEmailButton); // Add overlay to the body document.body.appendChild(overlay); // Get email value from Tampermonkey storage var storedEmail = GM_getValue('storedEmail', ''); // Populate saved email address into the input field emailInput.value = storedEmail; // Add event listener for save email button saveEmailButton.addEventListener('click', function() { // Save entered email address var newEmail = emailInput.value; GM_setValue('storedEmail', newEmail); // Success notification (can be customized) alert('Email address saved successfully!'); }); if ( (isElementVisible("body > div.container.flex-grow.my-4 > div.row.my-2 > div.col-12.col-md-8.col-lg-8.order-md-2.mb-4.text-center > center > div.form > div.alert.alert-danger.fade.show") && document.querySelector("body > div.container.flex-grow.my-4 > div.row.my-2 > div.col-12.col-md-8.col-lg-8.order-md-2.mb-4.text-center > center > div.form > div.alert.alert-danger.fade.show")?.innerText === ' The faucet does not have sufficient funds for this transaction.') || (isElementVisible("body > div.container.flex-grow.my-4 > div.row.my-2 > div.col-12.col-md-8.col-lg-8.order-md-2.mb-4.text-center > center > div.alert.alert-danger.fade.show") && document.querySelector("body > div.container.flex-grow.my-4 > div.row.my-2 > div.col-12.col-md-8.col-lg-8.order-md-2.mb-4.text-center > center > div.alert.alert-danger.fade.show").innerText === ' Your daily claim limit has been reached. Please come back in tomorrow.') ) { // Element is visible, so save the URL with a timestamp in a list var currentPageUrl = window.location.href; var currentTimeStamp = new Date().toISOString().slice(0, 19).replace('T', ' '); // ISO-8601 format without milliseconds var urlWithTimestamp = { url: currentPageUrl, timestamp: currentTimeStamp }; // Retrieve stored URLs with fallback to an empty array if not present var storedUrls = GM_getValue('storedUrls', []) || []; // Check if the page is already in the stored URLs var existingUrlIndex = storedUrls.findIndex(function (storedUrl) { return storedUrl.url === currentPageUrl; }); if (existingUrlIndex !== -1) { // Page is already present, update the timestamp if more than 24 hours have passed var storedTimestamp = new Date(storedUrls[existingUrlIndex].timestamp).getTime(); var currentTimestamp = new Date().getTime(); if (currentTimestamp - storedTimestamp > 6 * 60 * 60 * 1000) { storedUrls[existingUrlIndex].timestamp = currentTimeStamp; GM_setValue('storedUrls', storedUrls); } } else { // Page is not present, add it to the list storedUrls.push(urlWithTimestamp); GM_setValue('storedUrls', storedUrls); } } // Check if the element with the text "satoshi" or specific error messages is visible if ((isElementVisible("body > div.container.flex-grow.my-4 > div.row.my-2 > div.col-12.col-md-8.col-lg-8.order-md-2.mb-4.text-center > center > div.form > div.alert.alert-success.fade.show") && document.querySelector("body > div.container.flex-grow.my-4 > div.row.my-2 > div.col-12.col-md-8.col-lg-8.order-md-2.mb-4.text-center > center > div.form > div.alert.alert-success.fade.show").innerText.includes('satoshi')) || (isElementVisible("body > div.container.flex-grow.my-4 > div.row.my-2 > div.col-12.col-md-8.col-lg-8.order-md-2.mb-4.text-center > center > div.form > div.alert.alert-danger.fade.show") && document.querySelector("body > div.container.flex-grow.my-4 > div.row.my-2 > div.col-12.col-md-8.col-lg-8.order-md-2.mb-4.text-center > center > div.form > div.alert.alert-danger.fade.show").innerText === ' The faucet does not have sufficient funds for this transaction.') || (isElementVisible("body > div.container.flex-grow.my-4 > div.row.my-2 > div.col-12.col-md-8.col-lg-8.order-md-2.mb-4.text-center > center > div.form > div.alert.alert-danger.fade.show") && document.querySelector("body > div.container.flex-grow.my-4 > div.row.my-2 > div.col-12.col-md-8.col-lg-8.order-md-2.mb-4.text-center > center > div.form > div.alert.alert-danger.fade.show").innerText === ' Your daily claim limit has been reached. Please come back in tomorrow.')) { // Element is visible, so redirect to another URL var currentURL = window.location.href; var urlIndex = 0; var urls = [ "https://sollcrypto.com/home/page/bitcoin/", "https://sollcrypto.com/home/page/doge/", // ... (other supported Faucet URLs) ]; // Find the index of the current URL in the list for (var i = 0; i < urls.length; i++) { if (currentURL === urls[i]) { urlIndex = i; break; } } // Debugging: Output stored URLs before the loop var storedUrlsBefore = GM_getValue('storedUrls', []); console.log('Stored URLs before the loop:\n', JSON.stringify(storedUrlsBefore, null, 2)); // Redirect to the next URL only if a valid URL is found var foundValidUrl = false; do { if (urlIndex < urls.length - 1) { urlIndex++; } else { // If the last URL is reached, start again from the beginning urlIndex = 0; } // Check if the next URL is in the stored URLs with a timestamp and the timestamp is within 6 hours var nextUrl = urls[urlIndex]; var storedUrls = GM_getValue('storedUrls', []); var isUrlInStoredList = Array.isArray(storedUrls) && storedUrls.some(function (storedUrl) { return storedUrl.url === nextUrl && (new Date().getTime() - new Date(storedUrl.timestamp).getTime()) < 6 * 60 * 60 * 1000; // 6 hours in milliseconds }); if (!isUrlInStoredList) { foundValidUrl = true; console.log('Valid URL found:', nextUrl); } else { console.log('Invalid URL, skipping:', nextUrl); } } while (!foundValidUrl); // Console logs for completion console.log('Redirecting to the next URL:', nextUrl); // Debugging: Output updated stored URLs after the loop var storedUrlsAfter = GM_getValue('storedUrls', []); console.log('Stored URLs after the loop:\n', JSON.stringify(storedUrlsAfter, null, 2)); // Redirect to the next URL window.location.href = nextUrl; // Debugging alert console.log('Debugging: Redirecting to the next URL.\n\nValid URL found: ' + nextUrl); } else { // Element is not visible, so proceed with the actions // Check if the Referral Code is in the URL, if not, add it var currentURL = window.location.href; var referralCode = '?r=m.warchol@gmx.at'; if (!currentURL.includes(referralCode)) { currentURL += referralCode; window.location.href = currentURL; // Redirect with the updated URL } else { // Continue with actions as the Referral Code is already present // If the Faucetpay email field is found, fill it with the saved email address var faucetpayEmailInput = document.querySelector("#address"); if (faucetpayEmailInput) { faucetpayEmailInput.value = storedEmail; // Click the button after inserting the email address clickButton("body > div.container.flex-grow.my-4 > div.row.my-2 > div.col-12.col-md-8.col-lg-8.order-md-2.mb-4.text-center > center > form > div:nth-child(4) > button"); // Check if the pop-up/overlay appears and click the login button if conditions are met var intervalId = setInterval(function() { var antibotLinksValue = document.querySelector("#antibotlinks").value.length; var recaptchaResponseValue = document.querySelector("#g-recaptcha-response").value.length; if (antibotLinksValue > 1 && recaptchaResponseValue > 1) { clearInterval(intervalId); // Click the login button clickButton("#login"); } }, 1000); } } } })();