Giter Club home page Giter Club logo

d4v1-sudo / ip-geolocation-tool Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 35.36 MB

πŸ–₯️ β†’ πŸ”Ž β†’ πŸ—ΊοΈ - Python code that utilizes the MaxMind GeoIP2 database to retrieve geolocation information for a given IP address.

Home Page: https://dev.maxmind.com/static/pdf/GeoLite2-IP-MetaData-Databases-Comparison-Chart.pdf

License: MIT License

Python 100.00%
geoip geoip-location geoip2 geolocation ip-geolocation ip-lookup maxmind python latitude-and-longitude latitude-longitude

ip-geolocation-tool's Introduction

πŸ–₯️ β†’ πŸ”Ž β†’ πŸ—ΊοΈ - IP Geolocation Tool

This Python script utilizes the MaxMind GeoIP2 database to retrieve geolocation information for a given IP address.

Prerequisites

  • Python 3.x. Install here
  • MaxMind GeoLite2 City and ASN databases (GeoLite2-City.mmdb, GeoLite2-ASN.mmdb)

Usage

  1. Download

  2. Run the script on terminal (linux) or cmd (windows) python3 geo-ip.py or python3 all.py

  3. Enter the IP address you want to look up when prompted.

Output

The script will provide the following information if the IP address is found:

  • IP Address
  • AS Number
  • AS Name
  • ISP
  • City
  • Region
  • Country
  • Country Code
  • Postal Code
  • Timezone
  • Latitude
  • Longitude
  • Google Maps link to the location

Example

IP: 8.8.8.8
IP Informations:
IP Address: 8.8.8.8
AS Number: 15169
AS Name: Google LLC
ISP: Google LLC
City: Mountain View
Region: California
Country: United States
Country Code: US
Postal Code: 94043
Timezone: America/Los_Angeles
Latitude: 37.4229
Longitude: -122.085
Google Maps: [Google Maps Link](https://www.google.com/maps/search/?api=1&query=37.4229,-122.085)

Note

  • If the IP address is not found in the database, the script will display a message indicating that the address was not found.

Dependencies

  • geoip2 Python library, which can be installed via pip:
pip install geoip2

Download all MaxMind database for more data:

MaxMind GeoLite2 Database

Disclaimer

This script relies on third-party data provided by MaxMind. The accuracy of the geolocation information may vary.

ip-geolocation-tool's People

Contributors

d4v1-sudo avatar

Stargazers

 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.