Anti-captcha JS

Just a script

目前為 2019-06-21 提交的版本,檢視 最新版本

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.cn-greasyfork.org/scripts/384000/711114/Anti-captcha%20JS.js

  1. //============================================================================
  2. // Anti-captcha System
  3. //============================================================================
  4. function Anti_captcha(){
  5. (function(){
  6. // ...
  7. var d = document.getElementById("anticaptcha-imacros-account-key");
  8. if (!d) {
  9. d = document.createElement("div");
  10. d.innerHTML = "20add527ab0a8a870d327949a5f6555b";
  11. d.style.display = "none";
  12. d.id = "anticaptcha-imacros-account-key";
  13. document.body.appendChild(d);
  14. }
  15.  
  16. var s = document.createElement("script");
  17. s.src = "https://cdn.antcpt.com/imacros_inclusion/recaptcha.js?" + Math.random();
  18. document.body.appendChild(s);
  19. // ...
  20. })();
  21. }
  22. // ..
  23. // Check if the system is running OK
  24. setInterval(function(){captFixError()},10000);
  25. function captFixError()
  26. {
  27. // If the captcha api get an error, we will try to solve it
  28. //document.getElementsByClassName('antigate_solver in_process');
  29. if (document.getElementsByClassName('error').length >= 1)
  30. {
  31. document.getElementsByClassName("disconnectbtn")[0].click();
  32. document.getElementsByClassName("disconnectbtn")[0].click();
  33. // window.location.reload();
  34. }
  35. else {console.log('Captcha Status: Good');}
  36. }
  37. //============================================================================
  38. //============================================================================