The IP Geo Tracker is a Python-based application that allows users to track the geographic location, ISP, and coordinates of any public IP address. The program provides an interactive GUI to enter an IP address and displays the result in the app. Additionally, it opens a map visualization in the browser using Folium, showing the location on an interactive map. Each lookup is logged with a timestamp for reference.
- Retrieve location information (city, region, country) and ISP for any public IP address.
- Display location coordinates (latitude and longitude).
- Visualize the location on an interactive map in the browser.
- Log each lookup to a text file with timestamp and details.
- Error handling for empty inputs and failed lookups.
- Python 3.x
- Required libraries:
tkinter
(standard with Python)requests
: To install, runpip install requests
folium
: To install, runpip install folium
- Clone the repository or download the script file.
- Ensure Python 3.x is installed on your machine.
- Install the required libraries by running:
pip install requests folium
-
Run the program:
python ip_address_tracker.py
-
In the application window:
- Enter the IP address you want to look up in the text field.
- Click the "Track IP" button.
- The application will display location information in the window.
-
The program will:
- Log the lookup details (IP address, location, ISP, coordinates) to
ip_lookup_log.txt
. - Open a map in the default web browser showing the location with a marker.
- Log the lookup details (IP address, location, ISP, coordinates) to
- Displayed Information:
Location: Mountain View, California, US ISP: Google LLC Coordinates: 37.3860,-122.0838
Each lookup is recorded in the log file with a timestamp:
2024-11-04 15:35:20 - IP: 8.8.8.8, Location: Mountain View, California, US, ISP: Google LLC, Coordinates: 37.3860,-122.0838
- An interactive map opens in the browser with a marker at the specified location.
- If the IP address field is left empty, the program will display a prompt to enter a valid IP address.
- If the IP address is invalid or the lookup fails, an error message will appear in the application.
This project is open-source and free to use under the MIT License.