FaucetSpeed

Auto Login and faucet collect

  1. // ==UserScript==
  2. // @name FaucetSpeed
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.2
  5. // @description Auto Login and faucet collect
  6. // @author White
  7. // @match https://faucetspeedbtc.com/login*
  8. // @match https://faucetspeedbtc.com/dashboard*
  9. // @match https://faucetspeedbtc.com/faucet*
  10. // @match https://faucetspeedbtc.com/auto*
  11. // @icon https://www.google.com/s2/favicons?sz=64&domain=faucetspeedbtc.com
  12. // @grant none
  13. // ==/UserScript==
  14.  
  15. const config = {
  16. loginPageUrl: 'https://faucetspeedbtc.com/login',
  17. dashboardPageUrl: 'https://faucetspeedbtc.com/dashboard',
  18. redirectUrl: 'https://faucetspeedbtc.com/faucet',
  19. autoRedirectUrl: 'https://faucetspeedbtc.com/auto',
  20. email: 'seuemail@example.com',
  21. password: 'suasenha123',
  22. loginButtonSelector: 'button.btn-glow',
  23. faucetVerifyButtonSelector: 'button.btn.btn-primary.btn-lg.claim-button',
  24. imgSrcToCheck: 'assets/images/menu/bp.png'
  25. };
  26.  
  27. const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
  28.  
  29. class PageHandler {
  30. static isUserLoggedIn() {
  31. const images = Array.from(document.querySelectorAll('img'));
  32. return images.some(img => img.src.includes(config.imgSrcToCheck));
  33. }
  34.  
  35. static fillLoginForm() {
  36. const emailInput = document.querySelector('input[name="email"]');
  37. const passwordInput = document.querySelector('input[name="password"]');
  38.  
  39. if (emailInput && passwordInput) {
  40. emailInput.value = config.email;
  41. passwordInput.value = config.password;
  42. }
  43. }
  44.  
  45. static clickLoginButton() {
  46. const loginButton = document.querySelector(config.loginButtonSelector);
  47.  
  48. if (loginButton) {
  49. loginButton.click();
  50. }
  51. }
  52.  
  53. static clickVerifyButtonAfterDelay(delay) {
  54. setTimeout(() => {
  55. const verifyButton = document.querySelector(config.faucetVerifyButtonSelector);
  56.  
  57. if (verifyButton) {
  58. verifyButton.click();
  59. }
  60. }, delay);
  61. }
  62.  
  63. static async handleLoginPage() {
  64. if (!PageHandler.isUserLoggedIn()) {
  65. PageHandler.fillLoginForm();
  66. await sleep(7000);
  67. PageHandler.clickLoginButton();
  68. }
  69. }
  70.  
  71. static handleDashboardPage() {
  72. window.location.href = config.redirectUrl;
  73. }
  74.  
  75. static async handleFaucetPage() {
  76. await sleep(7000);
  77.  
  78. const faucetValueElement = document.querySelector('.media-body p.lh-1.mb-1.font-weight-bold');
  79.  
  80. if (faucetValueElement && faucetValueElement.innerText.trim() === '0') {
  81. console.log('O valor é 0. Redirecionando para /auto e fechando a página.');
  82. window.location.href = config.autoRedirectUrl;
  83. window.close();
  84. } else {
  85. for (let i = 5; i > 0; i--) {
  86. console.log(`Clique no botão "Verify" em ${i} segundos...`);
  87. await sleep(1000);
  88. }
  89. console.log('Clicando no botão "Verify"...');
  90. PageHandler.clickVerifyButtonAfterDelay(0);
  91. }
  92. }
  93. }
  94.  
  95. (async function() {
  96. 'use strict';
  97.  
  98. const allowedURLs = [
  99. 'https://faucetspeedbtc.com/',
  100. 'https://faucetspeedbtc.com'
  101. ];
  102. const currentURL = window.location.href;
  103. const isAllowedURL = allowedURLs.some(url => currentURL.startsWith(url));
  104.  
  105. if (isAllowedURL) {
  106. window.location.href = config.loginPageUrl;
  107. } else if (currentURL === config.loginPageUrl) {
  108. await PageHandler.handleLoginPage();
  109. } else if (currentURL === config.dashboardPageUrl) {
  110. PageHandler.handleDashboardPage();
  111. } else if (currentURL === config.redirectUrl) {
  112. await PageHandler.handleFaucetPage();
  113. }
  114. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址