276
Post New Requests Here / Re: Show IP Address from domain name
« Last post by 4wd on October 15, 2020, 02:17 AM »test.txt
Result:
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:
Result:
You could make a simple GUI for it, (see PoshGUI), but the code will blow out past 13 lines
Code: Text [Select]
- google.com
- cloudflare.com
- microsoft.com
- georgebloggs.org
Code: Text [Select]
- C:\> for /f %a in (test.txt) do ping -n 1 %a
Result:
Code: Text [Select]
- 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.org
- Ping 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 [Select]
- $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 [Select]
- google.com -> 216.58.200.110
- cloudflare.com -> 104.17.175.85
- microsoft.com -> 104.215.148.63
- georgebloggs.org -> Does not resolve
You could make a simple GUI for it, (see PoshGUI), but the code will blow out past 13 lines


Recent Posts


). Not an endorsement, just anecdotal - it might be a completely different story sending to the USA.