Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to scan all web ips

I would like to know how in JS I can go about scanning all the ip’s of the internet (not at the same time). In order to then see if Minecraft servers exist on these IPs. (I just don’t know how to generate all the ips), is there a definite list of 4.3 billion ips?

Thanks in advance!

So I don’t know how to go about it

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Stupid solution is just to scan all ip`s

const main = async () => {

for (let i1 = 0; i1<=255; i1++) {
for (let i2 = 0; i2<=255; i2++) {
for (let i3 = 0; i3<=255; i3++) {
for (let i4 = 0; i4<=255; i4++) {
  const ip = i1+'.'+i2+'.'+i3+'.'+i4;
  // do something with await
  console.log(ip);
}}}}

}

main().catch(console.error);
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading