Get Help Now
    24/7 Support

    ip2geo – a handy script for geoip lookups

    This script reads IP addresses from STDIN and uses the MaxMind GeoIP databases to output various data points for each source IP. The script uses the GeoCityLite and ASN databases for enrichment. The user can specify various fields for output in a format string. You can use this script to download the GeoIP database files if needed as well.

    Usage

    Look up a single IP address with default output format string:

    echo 192.30.252.122 | ./ip2geo.py

    "192.30.252.122","37.7697","-122.3933","36459","GitHub, Inc."

    [su_button url=”https://github.com/philhagen/ip2geo” target=”blank” style=”flat” background=”#222348″ size=”5″ radius=”0″]Learn more[/su_button]



    DISCLAIMER: THIS POST IS FOR INFORMATIONAL PURPOSES ONLY AND IS NOT TO BE CONSIDERED LEGAL ADVICE ON ANY SUBJECT MATTER. DIGITAL FORENSICS CORP. IS NOT A LAWFIRM AND DOES NOT PROVIDE LEGAL ADVICE OR SERVICES. By viewing posts, the reader understands there is no attorney-client relationship, the post should not be used as a substitute for legal advice from a licensed professional attorney, and readers are urged to consult their own legal counsel on any specific legal questions concerning a specific situation.