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
>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);