Minecraft Server Scanner

Minecraft Server Scanner Icon
Scans the entire internet for active Minecraft servers

Source Code
Source Code
Official Discord Server
Official Discord Server


Search




How It Works

When you go to the Minecraft multiplayer menu, you can see some basic info about a server before you join it, like the version, player count, etc. Your Minecraft client is getting this information by pinging the server, requesting it for its Minecraft info, and the server responds with a packet containing all that info. Note that there's no verification in that process that ensures you're actually using the Minecraft client, the server just responds to whatever requests it gets. That means that you're able to send your own request from any program, not just Minecraft, which is how I'm able to get the information from all of the servers in my database.

The next logical step would be creating the database in the first place. I can ping a server with the same method I mentioned before in order to check if it's actually hosting a Minecraft server, and simply repeat that process for every possible IP. The vast majority of Minecraft servers use IPv4, which can range from 1.0.0.0 to 255.255.255.255. That means there's 255 * 256^3, or 4,278,190,080 possible Minecraft server IPs. That's obviously a lot of IPs to go through, even for modern technology. When you ping a server, you'll need a certain threshold at which you decide that a server has been inactive for too long and must not be running. Usually about 5 seconds works well, but that means to go through every IP it would take 678 years! Luckily, you don't have to ping them one-by-one. Tools like Masscan can scan hundreds of thousands of IPs per second to make the process much more efficient, allowing you to check every address in under a day. Minecraft Java Edition's default port is 25565, so I use Masscan to scan on that port and get a list of IPs that are accepting TCP connections, and from there I can ping them with Minecraft's protocol to determine which ones are Minecraft servers. That list of servers is then sent to a second host, which constantly goes back over that list and pings the servers to get updated information.