Created
January 30, 2020 23:21
-
-
Save ultrafunkamsterdam/0407cf558b8b9776b5bb67c20e67b4c3 to your computer and use it in GitHub Desktop.
JS localhost portscanner from browser
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Promise.all( | |
[...Array(2 ** 16).keys()].map(function(port) { | |
fetch(`http://localhost:${port}`) | |
.then((result) => { | |
console.log(result) | |
}) | |
.catch((err) => { | |
console.log(err) | |
}) | |
})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment