Trotskygrad
бля
+354|6214|Vortex Ring State
So I have a table of a couple hundred IPs that I need resolved into countries...

They're in text format, I could easily import them into excel, or just put it as a CSV
eleven bravo
Member
+1,399|5474|foggy bottom
right on
Tu Stultus Es
{M5}Sniper3
Typical white person.
+389|6974|San Antonio, Texas
http://www.ip2location.com/

Sign up and you can look up 200 IPs a day.

Why you need to... I donno.
Trotskygrad
бля
+354|6214|Vortex Ring State
I need to do it so I can find out where most of my IP bans are from
HaiBai
Your thoughts, insights, and musings on this matter intrigue me
+304|5698|Bolingbrook, Illinois
Your thoughts, insights, and musings on this matter intrigue me?
Trotskygrad
бля
+354|6214|Vortex Ring State
dunno man
rdx-fx
...
+955|6806
http://dns.co.in/

http://lmgtfy.com/?q=ip+blocks+by+country

http://whois.arin.net/ui/

Or, a script to run on a *nix box;
Shell Script To Get Data Center Information, IP Owner, City and Country From Domain Name

Code:

#!/bin/bash
# A sample shell script to print domain ip address hosting information such as
# Location of server, city, ip address owner, country and network range.
# This is useful to track spammers or research purpose.
# -------------------------------------------------------------------------
# Copyright (c) 2006 nixCraft project <http://cyberciti.biz/fb/>
# This script is licensed under GNU GPL version 2.0 or above
# -------------------------------------------------------------------------
# This script is part of nixCraft shell script collection (NSSC)
# Visit http://bash.cyberciti.biz/ for more information.
# -------------------------------------------------------------------------
# Last updated on Mar/05/2010
# -------------------------------------------------------------------------
 
# Get all domains
_dom=$@
 
# Die if no domains are given
[ $# -eq 0 ] && { echo "Usage: $0 domain1.com domain2.com ..."; exit 1; }
for d in $_dom
do
    _ip=$(host $d | grep 'has add' | head -1 | awk '{ print $4}')
    [ "$_ip" == "" ] && { echo "Error: $d is not valid domain or dns error."; continue; }
    echo "Getting information for domain: $d [ $_ip ]..."
    whois "$_ip" | egrep -w 'OrgName:|City:|Country:|OriginAS:|NetRange:'
    echo ""
done
Note the key bit of code in there - whois "$_ip" | egrep -w 'OrgName:|City:|Country:|OriginAS:|NetRange:'
[note: I think the whois command in the script above is missing the target registrar to query.  This may or may not cause issues, depending on how your particular system is set up]

Format your list of IP addresses properly, then pipe it into the script, or... rewrite the script

OR
[Batch] Geo Lookup from the command line

Board footer

Privacy Policy - © 2024 Jeff Minard