Dinnerbone / mcstatus

A Python class for checking the status of an enabled Minecraft server
http://dinnerbone.com/minecraft/tools/status/
1.11k stars 146 forks source link

Change valid-hostname check to socket.gethostbyname #202

Closed PerchunPak closed 2 years ago

PerchunPak commented 2 years ago

This is a more accurate way than regex, because it is do request to DNS server, and trying to get number ip from domain. So this have almost 100% accurate. BUT it is triggers to not registered domains, about which haven't any information on DNS servers. Anyway it is more accurate than regex, because previous one triggered to www.