Skip to content

haithamaouati/Geolocate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Geolocate

Geolocate an IP address using the ip-api.com JSON API. The script displays various details such as city, region, country, ISP, and more. Additionally, it saves the fetched information to a JSON file.

screenshot

Usage

To use the Geolocate script, follow these steps:

  1. Clone the repository:

    git clone https://github.com/haithamaouati/Geolocate.git
  2. Navigate to the Geolocate directory:

    cd Geolocate
  3. Run the script with a specified IP address:

    ./geolocate.sh [OPTIONS] <IP address>

    Replace <IP address> with the actual IP address you want to geolocate.

Options:

-h, --help Displays the help message with usage instructions.

-i, --ip <IP> Specify the IP address to geolocate. If not provided, the script will use your public IP.

-f, --file Saves the geolocation information to a JSON file named after the IP address.

Dependencies

The script requires the following dependencies:

  • figlet: Program for making large letters out of ordinary text
  • curl: Command line tool for transferring data with URL syntax
  • jq: Command-line JSON processor

Make sure to install these dependencies before running the script.

Author

License

This Geolocate Bash script is open-source and available under the MIT License.

Feel free to contribute or report issues on the GitHub repository.