Coder Social home page Coder Social logo

jftuga / ipinfo Goto Github PK

View Code? Open in Web Editor NEW
20.0 3.0 2.0 41 KB

Return IP address info including geographic location and distance when given IP address, email address, host name or URL

License: MIT License

Go 99.18% Makefile 0.82%
ipinfo golang geoip distance command-line

ipinfo's Introduction

ipinfo

Return IP address info including geographic location and distance when given IP address, email address, host name or URL

IP geolocation is retrieved from https://ipinfo.io/ who allows for 1000 unauthenticated API calls per day.

Usage

Usage of ipinfo:
  -m	merge identical hosts
  -t int
    	number of simultaneous threads (default 30)
  -v	display program version and then exit
  -w	wrap output to better fit the screen width
  -x	only display your external IP and then exit

Installation

  • macOS: brew update; brew install jftuga/tap/ipinfo
  • Binaries for Linux, macOS and Windows are provided in the releases section.

Examples

macbook:ipinfo jftuga$ ./ipinfo amazon.com https://cisco.com [email protected]

+------------+-----------------+-----------------------------------------------+---------------------------+---------------+------------+---------+-------------------+----------+
|   INPUT    |       IP        |                   HOSTNAME                    |            ORG            |     CITY      |   REGION   | COUNTRY |        LOC        | DISTANCE |
+------------+-----------------+-----------------------------------------------+---------------------------+---------------+------------+---------+-------------------+----------+
| amazon.com | 176.32.98.166   |                                               | AS16509 Amazon.com, Inc.  | Ashburn       | Virginia   | US      | 39.0481,-77.4728  |   483.66 |
| amazon.com | 176.32.103.205  |                                               | AS16509 Amazon.com, Inc.  | Ashburn       | Virginia   | US      | 39.0481,-77.4728  |   483.66 |
| amazon.com | 205.251.242.103 | s3-console-us-standard.console.aws.amazon.com | AS16509 Amazon.com, Inc.  | Ashburn       | Virginia   | US      | 39.0481,-77.4728  |   483.66 |
| cisco.com  | 72.163.4.185    | redirect-ns.cisco.com                         | AS109 Cisco Systems, Inc. | Richardson    | Texas      | US      | 32.9462,-96.7058  |   769.31 |
| github.com | 192.30.253.113  | lb-192-30-253-113-iad.github.com              | AS36459 GitHub, Inc.      | San Francisco | California | US      | 37.7697,-122.3930 |  2186.72 |
| github.com | 192.30.253.112  | lb-192-30-253-112-iad.github.com              | AS36459 GitHub, Inc.      | San Francisco | California | US      | 37.7697,-122.3930 |  2186.72 |
+------------+-----------------+-----------------------------------------------+---------------------------+---------------+------------+---------+-------------------+----------+


your IP addr : w.x.y.z
your location: A,B
elapsed time : 450.60ms

ipinfo's People

Contributors

jftuga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

emuhedo lonesta

ipinfo's Issues

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.