ipcap 0.1.1

🌍 A CLI & library for decoding IP addresses into state, postal code, country, coordinates, etc without internet access.
Documentation

🌍 IPCap

Crates.io docs License

ipcap 0.1.0

 ▄█     ▄███████▄  ▄████████    ▄████████    ▄███████▄ 
███    ███    ███ ███    ███   ███    ███   ███    ███ 
███▌   ███    ███ ███    █▀    ███    ███   ███    ███ 
███▌   ███    ███ ███          ███    ███   ███    ███ 
███▌ ▀█████████▀  ███        ▀███████████ ▀█████████▀  
███    ███        ███    █▄    ███    ███   ███        
███    ███        ███    ███   ███    ███   ███        
█▀    ▄████▀      ████████▀    ███    █▀   ▄████▀      

🌍 IPCAP CLI
============

Perform IP lookup from the command line without internet access. Retrieve information
about IP addresses, including details such as city, region, country, location, etc.

📖 Table of Contents

🚀 Installation

To install ipcap, use the following Cargo command:

cargo install --locked ipcap

📖 Download the dataset

Download the city database from the repository using this command:

curl -LS https://raw.githubusercontent.com/wiseaidev/ipcap/main/data/geo_ip_city.dat --create-dirs -o ~/ipcap/geo_ip_city.dat

This will download the data/geo_ip_city.dat from the repository and put it under ~/ipcap/geo_ip_city.dat.

If, for some reason, you decide to change this file location, just set this environment variable to help the CLI read this file. To set the environment variable before running your Rust program, you can do something like:

export IPCAP_FILE_PATH=/your/custom/path/geo_ip_city.dat

Replace /your/custom/path/geo_ip_city.dat with the desired file path. If the environment variable is not set, the program will use the default path (/home/username/ipcap/geo_ip_city.dat).

✨ Features

  • IP address lookup without internet access.
  • Zero API calls for decoding IP addresses.
  • Dataset download and customizable file path.

🚗 Usage

Learn how to use ipcap and explore its features with the following examples:

Perform IP lookup:

ipcap -t 8.8.8.8

🎨 Options

Option Default Value Description
--target "" Set the IP address to lookup with the --target option.

🤝 Contributing

Contributions and feedback are welcome! If you'd like to contribute, report an issue, or suggest an enhancement, please engage with the project on GitHub. Your contributions help improve this CLI for the community.

📄 License

This project is licensed under the MIT License.