Sign inSign up

vandot/whereami

By vandot

Updated almost 6 years ago

CLI "tool" and a bash "library" for getting and parsing users geolocation data

Image
0

474

vandot/whereami repository overview

WhereAmI

CLI geolocation tool using bashclient for HTTP requests abusing freegeoip.net API.

Output can be only coordinates, only location, CSV, JSON or XML. For prettier JSON and XML output tool will try to use jq and xmllint.

Requirements

  1. bash, 3 or later
  2. netcat to handle socket connections

Installation

Git clone or copy paste whereami.sh and bashclient.sh or docker pull vandot/whereami

Example usage

You can use whereami as a CLI tool with arguments.

$ ./whereami.sh
$ 144.8186,120.4681

$ ./whereami.sh json
$ {"ip":"","country_code":"","country_name":"","region_code":"","region_name":"","city":"","zip_code":"","time_zone":"","latitude":144.8186,"longitude":120.4681,"metro_code":0}

$ ./whereami.sh human
$ CODE,COUNTRY,CITY

$ docker run --rm vandot/whereami
$ 144.8186,120.4681

Tag summary

Content type

Image

Digest

Size

3.4 MB

Last updated

almost 6 years ago

docker pull vandot/whereami