ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

Show IP Address from domain name

(1/4) > >>

davcom:
Before I ask anyone to do any coding, does anyone know of a utility that allows a (list of ?) domain name(s) to be used, and the current IP Addresses that each resolves to ?

The scenario is that a game I play does have Connect by IP (only). It used to allow putting a domain name in and it all worked well, until the ability to connect via a domain name was removed.

Because the game server is behind a dynamic IP, which changes more frequently than I'd like, everyone else that plays on the server needs to open a command prompt and issue a ping request to see what the IP Address may have changed to, so they can enter that in the Connect by IP field. A number of these players haven't even heard of a command prompt nor should I need to teach them the arcane art of pinging something.

I'd like the simplest method possible, to have a portable utility (maybe C# ?) that may only have a single saved domain name, that shows the current IP of that domain name.
I can see that this would be useful for more than 1 domain name but for now, 1's all we need. Probably need a Refresh so that a timed check (every x minutes) can be overridden and have it checked immediately.

I've actually done a bit of hunting on the net and there's any manner of dns and hostname and domain name checkers but even if they work they often have screeds of other bumpf that just isn't relevant.

Anyone got any bright idea's / suggestions ?

4wd:
test.txt

--- Code: Text ---google.comcloudflare.commicrosoft.comgeorgebloggs.org

--- Code: Text ---C:\> for /f %a in (test.txt) do ping -n 1 %a
Result:

--- Code: Text ---C:\>ping -n 1 google.com Pinging google.com [216.58.200.110] with 32 bytes of data:General failure. Ping statistics for 216.58.200.110:    Packets: Sent = 1, Received = 0, Lost = 1 (100% loss), C:\>ping -n 1 cloudflare.com Pinging cloudflare.com [104.17.176.85] with 32 bytes of data:General failure. Ping statistics for 104.17.176.85:    Packets: Sent = 1, Received = 0, Lost = 1 (100% loss), C:\>ping -n 1 microsoft.com Pinging microsoft.com [13.77.161.179] with 32 bytes of data:General failure. Ping statistics for 13.77.161.179:    Packets: Sent = 1, Received = 0, Lost = 1 (100% loss), C:\>ping -n 1 georgebloggs.orgPing request could not find host georgebloggs.org. Please check the name and try again.
If you want to get fancy you could parse the reply for the IP only.

Or some PowerShell, this will loop every 60 seconds until it's killed:


--- Code: PowerShell ---$a = get-content ".\test.txt" do {  foreach ($i in $a ) {    try {      $i + " -> " + [System.Net.Dns]::GetHostAddresses($i)[0]    }    catch {      $i + " -> Does not resolve"    }  }  Start-Sleep -Seconds 60} while ($true)
Result:

--- Code: Text ---google.com -> 216.58.200.110cloudflare.com -> 104.17.175.85microsoft.com -> 104.215.148.63georgebloggs.org -> Does not resolve
You could make a simple GUI for it, (see PoshGUI), but the code will blow out past 13 lines :P

wraith808:
You could make a simple GUI for it, (see PoshGUI), but the code will blow out past 13 lines
-4wd (October 15, 2020, 02:17 AM)
--- End quote ---

Not if you just output it to a grid :P

4wd:
Not if you just output it to a grid :P-wraith808 (October 15, 2020, 02:28 PM)
--- End quote ---

True, but I was thinking of a simple updating textbox, (possibly frameless? - haven't really looked), rather than a scrolling console, (though you could clear it between updates).

KodeZwerg:
Or by browser using any domain property listers like https://intodns.com/

Navigation

[0] Message Index

[#] Next page

Go to full version