- This script fetches geolocation information about an IP address using APIs. It provides details such as the country, city, region, timezone, and more. The input/output is displayed in a visually appealing bright bold white color for better readability.
- Fetches public IP address automatically.
- Provides geolocation details of any IP address.
- Bright bold white formatting for input/output.
- Error handling for invalid inputs.
- Typewriter animation for a smooth output experience.
- Displays Google Maps link for the geolocation.
- Install the cURL library:
sudo apt-get install libcurl4-openssl-dev
- Install the nlohmann/json library:
sudo apt-get install nlohmann-json3-dev
- Clone the repository to your local machine:
git clone https://github.com/neooverride/IP-Geolocator.git
- Navigate into the project directory:
cd IP-Geolocator
g++ ipGeolocator.cpp asciiArt.cpp -o outputfile -lcurl
- Run the compiled binary:
./outputfile
- When prompted:
Do you want to use your public IP address (y/n)?
- If you enter Y/y then it fetches IP geolocation of your router's IP.
- When I entered Google's public DNS IP in the given image, this information was displayed.
- nlohmann/json: For JSON parsing.
- cURL: For making HTTP requests.
Contributions are welcome! If you find a bug or have a suggestion, feel free to open an issue or create a pull request.