GithubHelp home page GithubHelp logo

gttigs / geoip Goto Github PK

View Code? Open in Web Editor NEW

This project forked from clong/geoip

0.0 1.0 0.0 196 KB

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

Python 100.00%

geoip's Introduction

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

geoip's People

Contributors

clong avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.