Anti-captcha JS

Just a script

当前为 2019-06-05 提交的版本,查看 最新版本

此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.cn-greasyfork.org/scripts/384000/705233/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.cookie = 'reloaded=true';
  32. document.getElementsByClassName("disconnectbtn")[0].click();
  33. document.getElementsByClassName("disconnectbtn")[0].click();
  34. window.location.reload();
  35. }
  36. else {console.log('Captcha Status: Good');}
  37. }
  38. // ...
  39. var is_reload = (document.cookie.match(/^(?:.*;)?\s*reloaded\s*=\s*([^;]+)(?:.*)?$/)||[,null])[1];
  40. if( is_reload )
  41. {
  42. Anti_captcha();
  43. googleCaptcha = true;
  44. }
  45. //============================================================================
  46. //============================================================================