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

目前为 2015-10-06 提交的版本。查看 最新版本

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