AUTO-OPEN hCaptcha + reCaptcha

Auto clicks the recaptcha and hcaptcha - NOT SOLVING

  1. // ==UserScript==
  2. // @name AUTO-OPEN hCaptcha + reCaptcha
  3. // @author WXC
  4. // @version 1.0
  5. // @description Auto clicks the recaptcha and hcaptcha - NOT SOLVING
  6. // @match https://*/recaptcha/*
  7. // @match https://*.hcaptcha.com/*hcaptcha-challenge*
  8. // @match https://*.hcaptcha.com/*checkbox*
  9. // @match https://*.hcaptcha.com/*captcha*
  10. // @grant none
  11. // @license MIT
  12. // @namespace https://gf.qytechs.cn/users/713625
  13. // ==/UserScript==
  14.  
  15.  
  16. // you can configure auto-open interval in HC_PAUSE or RC_PAUSE
  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. (function() {
  28. 'use strict';
  29.  
  30.  
  31. var domain = (window.location != window.parent.location) ? document.referrer.toString() : document.location.toString();
  32. // excluding domains
  33. if(
  34. domain.indexOf('example.com') == -1
  35. &&
  36. domain.indexOf('PartOfUrlName') == -1
  37. &&
  38. domain.indexOf('paypal.com') == -1
  39. ) {
  40.  
  41.  
  42.  
  43. // HCAPTCHA SECTION
  44. const HC_PAUSE = "3000"; // ms to open ( 3000ms = 5sec )
  45. const HC_CHECK_BOX = "#checkbox";
  46. const HC_ARIA_CHECKED = "aria-checked";
  47.  
  48. if (window.location.href.includes("checkbox")) {
  49. var hc_checkboxInterval = setInterval(function() {
  50. if (!qSelector(HC_CHECK_BOX)) {
  51. } else if (qSelector(HC_CHECK_BOX).getAttribute(HC_ARIA_CHECKED) == "true") {
  52. clearInterval(hc_checkboxInterval);
  53. console.log("HC SOLVED");
  54. } else if (!isHidden(qSelector(HC_CHECK_BOX)) && qSelector(HC_CHECK_BOX).getAttribute(HC_ARIA_CHECKED) == "false") {
  55. qSelector(HC_CHECK_BOX).click();
  56. clearInterval(hc_checkboxInterval);
  57. console.log("HC OPEN BOX");
  58. } else {
  59. return;
  60. }
  61.  
  62. }, HC_PAUSE );
  63. }
  64.  
  65.  
  66.  
  67. // RECAPTCHA SECTION
  68. const RC_PAUSE = "3000"; // ms to open ( 3000ms = 5sec )
  69. const CHECK_BOX = ".recaptcha-checkbox-border";
  70. const RECAPTCHA_STATUS = "#recaptcha-accessible-status";
  71. const DOSCAPTCHA = ".rc-doscaptcha-body";
  72.  
  73. var rc_checkboxInterval = setTimeout(function() {
  74.  
  75. var solved = false;
  76. var checkBoxClicked = false;
  77. var requestCount = 0;
  78.  
  79. var recaptchaInitialStatus = qSelector(RECAPTCHA_STATUS) ? qSelector(RECAPTCHA_STATUS).innerText : ""
  80. function isHidden(el) {
  81. return(el.offsetParent === null)
  82. }
  83. try {
  84. if(!checkBoxClicked && qSelector(CHECK_BOX) && !isHidden(qSelector(CHECK_BOX))) {
  85. qSelector(CHECK_BOX).click();
  86. checkBoxClicked = true;
  87. console.log("RC OPEN BOX");
  88. }
  89. //Check if the captcha is solved
  90. if(qSelector(RECAPTCHA_STATUS) && (qSelector(RECAPTCHA_STATUS).innerText != recaptchaInitialStatus)) {
  91. solved = true;
  92. console.log("RC SOLVED");
  93. }
  94. if(requestCount > 1) {
  95. console.log("Attempted Max Retries. Stopping the solver");
  96. solved = true;
  97. }
  98. //Stop solving when Automated queries message is shown
  99. if(qSelector(DOSCAPTCHA) && qSelector(DOSCAPTCHA).innerText.length > 0) {
  100. console.log("Automated Queries Detected");
  101. }
  102. } catch(err) {
  103. console.log(err.message);
  104. console.log("An error occurred while solving. Stopping the solver.");
  105. }
  106.  
  107. }, RC_PAUSE );
  108. }
  109. else {
  110.  
  111. console.log( domain +" EXCLUDED!" );
  112.  
  113. }
  114.  
  115.  
  116. })();

QingJ © 2025

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