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

As of 2015-08-29. See the latest version.

  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. // @version 1.0.3
  10. // @author wOxxOm
  11. // @namespace wOxxOm.scripts
  12. // @license MIT License
  13. // @grant none
  14. // @run-at document-start
  15. // ==/UserScript==
  16.  
  17. document.addEventListener('DOMContentLoaded', function() {
  18. var x = document.evaluate('//form//div/span[contains("0123456789",.)]', document,
  19. null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
  20. var btn = document.getElementById('btn_download');
  21. if (x && btn) {
  22. var nodes = [];
  23. for (i = 0; i < 4; i++)
  24. nodes.push(x.snapshotItem(i));
  25. var nodes = nodes.sort(function(a,b){ return parseInt(a.style.paddingLeft) - parseInt(b.style.paddingLeft) });
  26. document.forms.F1.code.value = nodes.map(function(n){ return n.textContent }).join('');
  27.  
  28. if (location.href.indexOf('clicknupload.com') >= 0)
  29. document.forms.F1.submit();
  30. else
  31. new MutationObserver(function(mutations) {
  32. if (!btn.disabled)
  33. document.forms.F1.submit();
  34. }).observe(btn, {attributes:true, attributesFilter:['disabled']});
  35. }
  36. });