Question

I need to complete this job in Batch.

I use NSLOOKUP command to find the Hostname of an IP, But how I can locate the country of that IP And the ISP Name?

Is it possibly?

Thankyou for read.

EDIT: For example i want to do this in a bat code:

IP address  **.***.30.113
Hostname    **-***-30-113.rdns.blackberry.net
ISP Research In Motion UK Limited
Country United Kingdom United Kingdom

EDIT 2: I accept an external APP to do it, please

I've tryed "whois" from sysinternals, But it's giving me bad info cause if i put my local ip in the program, it gives me the city of the organization (Madrid, Spain), not the most nearest location of mi isp provider (Valencia, Spain), If i geo-locate my ip in internet it gives me the good info (Valencia, Spain)

Any ideas about that?

Was it helpful?

Solution

You cannot get that information without an IP-to-Country table.

Try http://www.maxmind.com/app/geolitecountry, it is free and works great.

OTHER TIPS

Here is a batch file I coded that does an IP Lookup using ipinfo.io's API. https://pastebin.com/Ucs2Kuqn

echo sUrl = "http://ipinfo.io/%ip%/json" > %temp%\%webclient%.vbs
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top