This Python script was developed to help obtain and display detailed information about IP addresses, whether for your own IP, a network IP, or a specific website. It uses the ipapi.co
API to retrieve information and the Rich
library to display it clearly and organisedly.
The code consists of several functions to fetch and display IP information:
get_ip_info
: Fetches IP information from theipapi.co
API.get_site_ip_info
: Resolves the IP address of a website and fetches detailed information about it.display_ip_info
: Displays the IP information in a table using theRich
library.
To use the script, follow these steps:
- Ensure you have Python installed on your system.
- Save the Python script
ipo.py
in a directory of your choice. - Open a terminal or command prompt and navigate to the directory where the script is located.
- Run the script by typing
python ipo.py
in the terminal. - Follow the on-screen instructions to select the desired option:
- 1 for local IP information.
- 2 for network IP information.
- 3 for specific website IP information.
- Detailed information about the IP will be displayed in a table in the terminal.
- Python 3.x
- Python Libraries:
requests
,rich
You can install the required libraries using the following command:
pip install requests rich
- Attribution 4.0 International (CC BY 4.0)
- David C Cavalcante
- LinkedIn: David C Cavalcante
- Medium: David C Cavalcante
If this script has been helpful for you, consider making a donation to support our work:
- $USDT (TRC-20): TP6zpvjt2ZNGfWKPevfp65ZrcbKMWSQXDi
Your donations help us continue developing useful and innovative tools.
Positive results, rapid innovation. Leading the Digital Revolution as the Pioneering 100% Artificial Intelligence Team.
- URL: Takk™ Innovate Studio
- Medium: Takk™ Innovate Studio