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