Simple html numeric captcha solver

After you click "Slow download" button the script solves the numeric captcha, waits for the countdown to finish, clicks the download button

Verze ze dne 09. 08. 2017. Zobrazit nejnovější verzi.

  1. // ==UserScript==
  2. // @name Simple html numeric captcha solver
  3. // @description After you click "Slow download" button the script solves the numeric captcha, waits for the countdown to finish, clicks the download button
  4. // @include http://www.rziz.net/*/*.html
  5. // @include http://file.up09.com/*
  6. // @include http://clicknupload.com/*
  7. // @include http://hulkload.com/*
  8. // @include http://up4.im/*
  9. // @include http://www.gboxes.com/*
  10. // @include http://mrfile.co/*.html
  11. // @include http://fileshd.net/*
  12. // @include http://nizfile.net/*.html
  13. // @include http://lynxshare.com/*
  14. // @include http://datasbit.com/*
  15. // @include http://idup.to/*
  16. // @include http://media4up.com/*
  17. // @version 1.1.1
  18. // @author wOxxOm
  19. // @namespace wOxxOm.scripts
  20. // @license MIT License
  21. // @run-at document-end
  22. // ==/UserScript==
  23.  
  24. var x = document.evaluate(
  25. '//form//div/span[contains("0123456789",.) and contains(@style,"padding-left")]',
  26. document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
  27. var btn = document.evaluate(
  28. '//form//*[not(*) and not(self::script) and (contains(@id,"btn") or contains(@id,"download") or contains(.,"download") or contains(.,"Download"))]',
  29. document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
  30. if (x && btn) {
  31. var nodes = [];
  32. for (var i = 0; i < 4; i++)
  33. nodes.push(x.snapshotItem(i));
  34. var nodes = nodes.sort((a,b) => parseInt(a.style.paddingLeft) - parseInt(b.style.paddingLeft));
  35. document.forms.F1.code.value = nodes.map(n => n.textContent).join('');
  36.  
  37. switch (location.hostname) {
  38. case 'clicknupload.com':
  39. document.forms.F1.submit();
  40. break;
  41. case 'media4up.com':
  42. new MutationObserver(mutations => mutations[0].target.style.visibility == 'hidden' && document.forms.F1.submit())
  43. .observe(document.querySelector('#countdown'), {attributes:true, attributeFilter:['style']});
  44. break;
  45. default:
  46. new MutationObserver(mutations => !btn.disabled && document.forms.F1.submit())
  47. .observe(btn, {attributes:true, attributeFilter:['disabled']});
  48. }
  49. }