GP Captcha Sover

Save time

  1. // ==UserScript==
  2. // @name GP Captcha Sover
  3. // @namespace GP Captcha Sover
  4. // @version 0.5
  5. // @description Save time
  6. // @author vikiweb
  7. // @match *://*/*
  8. // @license MIT
  9. // ==/UserScript==
  10.  
  11. (function () {
  12. 'use strict';
  13.  
  14. if(document.querySelector('#gpcaptcha')){
  15.  
  16. const captchaImgs = document.querySelectorAll('#gpcaptcha .svg-padding');
  17. const hashes = [
  18. {"Key": "M512 176.001C512 273.203"},
  19. {"Flag": "M349.565 98.783C295.978"},
  20. {"Heart": "M414.9 24C361.8 24 312"},
  21. {"Car": "M499.991 168h-54.815l-7.854-20"},
  22. {"Plane": "M472 200H360.211L256.013"},
  23. {"House" :"M488 312.7V456c0 13.3-10.7"},
  24. {"Cup":"M192 384h192c53 0 96-43"},
  25. {"Tree" : "M377.33 375.429L293.906"},
  26. {"Star" : "M259.3 17.8L194 150.2 47.9"},
  27. {"Truck":"M624 352h-16V243.9c0-12.7-5"}
  28. ]
  29.  
  30. const selectedText = document.querySelector('#gpcaptcha p .text-capitalize').innerText.toLowerCase();
  31. const checkHash = hashes.find(hash => Object.keys(hash)[0].toLowerCase() === selectedText);
  32. const flagValue = checkHash ? Object.values(checkHash)[0] : null;
  33. console.log(selectedText, flagValue)
  34.  
  35. function checkImages() {
  36. Array.from(captchaImgs).forEach((img, i) => {
  37. const svg = img.querySelector('svg path').getAttribute('d');
  38. if (svg.startsWith(flagValue)) {
  39. img.click()
  40. console.log('Matched');
  41. }else{
  42. console.log('Doesnt match');
  43. }
  44. });
  45. }
  46.  
  47. setInterval(function(){
  48. checkImages();
  49. },10000)
  50. }
  51.  
  52. })();