Captha Solver

Automatically click hCaptcha checkbox

  1. // ==UserScript==
  2. // @name Captha Solver
  3. // @namespace https://tampermonkey.net/
  4. // @version 1.25
  5. // @description Automatically click hCaptcha checkbox
  6. // @match https://*.hcaptcha.com/*hcaptcha-challenge*
  7. // @match https://*.hcaptcha.com/*checkbox*
  8. // @match https://*.hcaptcha.com/*captcha*
  9. // @grant GM_xmlhttpRequest
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. var CHECKBOX = "#checkbox";
  15. var ARIA_CHECKED = "aria-checked";
  16. var captchaDetected = false; // Flag to track if "Ada Chapta" has been sent
  17.  
  18.  
  19. function qSelector(selector) {
  20. return document.querySelector(selector);
  21. }
  22.  
  23. function isHidden(el) {
  24. return (el.offsetParent === null);
  25. }
  26.  
  27. if (window.location.href.includes("checkbox")) {
  28. var checkboxInterval = setInterval(function() {
  29. if (!qSelector(CHECKBOX)) {
  30. // If checkbox is not found, do nothing
  31. } else if (qSelector(CHECKBOX).getAttribute(ARIA_CHECKED) == "true") {
  32. clearInterval(checkboxInterval); // Stop checking if already checked
  33. } else if (!isHidden(qSelector(CHECKBOX)) && qSelector(CHECKBOX).getAttribute(ARIA_CHECKED) == "false") {
  34. if (!captchaDetected) {
  35. // Send "Ada Chapta" message only once
  36. console.log("Ada Chapta");
  37. captchaDetected = true; // Set flag to true to prevent repeated messages
  38. }
  39.  
  40. // Introduce a random delay before clicking the checkbox
  41. setTimeout(function() {
  42. qSelector(CHECKBOX).click();
  43. console.log("Chapta solved");
  44. location.reload();
  45. }, Math.floor(Math.random() * 75000) + 15000); // Fixed the syntax here
  46. } else {
  47. return;
  48. }
  49.  
  50. }, 3000);
  51. }
  52.  
  53. })();