Giter Club home page Giter Club logo

iploc's Introduction

iploc

Reverse geocoding of IP addresses -- find where that IP comes from!

Usage

iploc is a very straightforward utility: give it an IP address and will return as many information as possible regarding its geographical location:

iploc 12.34.56.78
{"as":"AS7018 AT\u0026T Services, Inc.","city":"Columbus","country":"United States","countryCode":"US","isp":"AT\u0026T Services","lat":39.9653,"lon":-83.0235,"org":"AT\u0026T Services","query":"12.34.56.78","region":"OH","regionName":"Ohio","status":"success","timezone":"America/New_York","zip":"43215"}

It provides a very simple pretty-print option:

iploc 12.34.56.78 -p
{
    "as": "AS7018 AT\u0026T Services, Inc.",
    "city": "Columbus",
    "country": "United States",
    "countryCode": "US",
    "isp": "AT\u0026T Services",
    "lat": 39.9653,
    "lon": -83.0235,
    "org": "AT\u0026T Services",
    "query": "12.34.56.78",
    "region": "OH",
    "regionName": "Ohio",
    "status": "success",
    "timezone": "America/New_York",
    "zip": "43215"
}

...but you're much better off with jq:

iploc 12.34.56.78 | jq -r .city
Columbus

Need help?

A simple utility to find geographical informations
about an IP address: given an IP as an input, it will return
as many geographical info as possible.

Usage:
  iploc [flags]
  iploc [command]

Examples:
iploc 127.0.0.1
iploc - (own IP address)

Available Commands:
  help        Help about any command
  version     Print the version number of iploc

Flags:
  -h, --help     help for iploc
  -p, --pretty   pretty print json

Use "iploc [command] --help" for more information about a command.

Need version info?

iploc version
v1.0.0

Installation

Grab a binary for the release page. That's it.

If you fancy building things from scratch, clone this repo and run a go build for yourself!

Note: iploc is built on top of ipinfo.io -- they do the hard work!

Tests

lol

Development

For development with Go, I usually use a local docker container -- here's what I do:

  • make build creates the container
  • make gets in the container
  • go run main.go and have fun with the app

Once you're done, you can test binaries with make release.

iploc's People

Contributors

odino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

icodein

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.