Skip to content
/ GeoIP Public

A script for quickly gathering GeoIP data on a single or multiple IP Addresses

Notifications You must be signed in to change notification settings

clong/GeoIP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

GeoIP

Dependencies

Usage

Single IP Lookup:

$ python geoip.py 192.30.252.128
IP Address: 192.30.252.128
AS Number: 36459
AS Name: GitHub, Inc.
City: San Francisco
Region: California
Country: United States
Country Code: US
Latitude: 37.7696990967
Longitude: -122.393302917
Google Maps: http://maps.google.com/maps?f=q&source=s_q&hl=ca&geocode=&q=37.7696990967+-122.393302917

Multiple IP Lookup (Table or CSV):

$ python geoip.py -f iplist.txt -t
+----------------+-----------+--------------+---------------+------------+---------------+--------------+---------------+----------------+------------------------------------------------------------------------------------------+
|   IP Address   | AS Number |   AS Name    |      City     |   Region   |    Country    | Country Code |    Latitude   |   Longitude    |                                     Google Maps URL                                      |
+----------------+-----------+--------------+---------------+------------+---------------+--------------+---------------+----------------+------------------------------------------------------------------------------------------+
| 192.30.252.128 |   36459   | GitHub, Inc. | San Francisco | California | United States |      US      | 37.7696990967 | -122.393302917 | http://maps.google.com/maps?f=q&source=s_q&hl=ca&geocode=&q=37.7696990967+-122.393302917 |
| 74.125.239.131 |   15169   | Google Inc.  | Mountain View | California | United States |      US      | 37.4192008972 | -122.057403564 | http://maps.google.com/maps?f=q&source=s_q&hl=ca&geocode=&q=37.4192008972+-122.057403564 |
| 98.139.183.24  |   26101   |    Yahoo!    |   Sunnyvale   | California | United States |      US      | 37.4249000549 | -122.007400513 | http://maps.google.com/maps?f=q&source=s_q&hl=ca&geocode=&q=37.4249000549+-122.007400513 |
+----------------+-----------+--------------+---------------+------------+---------------+--------------+---------------+----------------+------------------------------------------------------------------------------------------+
$ python geoip.py -f iplist.txt -c
IP Address,AS Number,AS Name,City,Region,Country,Country Code,Latitude,Longitude,Google Maps URL
192.30.252.128,36459,GitHub, Inc.,San Francisco,California,United States,US,37.7696990967,-122.393302917,http://maps.google.com/maps?f=q&source=s_q&hl=ca&geocode=&q=37.7696990967+-122.393302917
74.125.239.131,15169,Google Inc.,Mountain View,California,United States,US,37.4192008972,-122.057403564,http://maps.google.com/maps?f=q&source=s_q&hl=ca&geocode=&q=37.4192008972+-122.057403564
98.139.183.24,26101,Yahoo!,Sunnyvale,California,United States,US,37.4249000549,-122.007400513,http://maps.google.com/maps?f=q&source=s_q&hl=ca&geocode=&q=37.4249000549+-122.007400513

About

A script for quickly gathering GeoIP data on a single or multiple IP Addresses

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages