This Python script provides functionalities to gather information about IP addresses using various APIs, including geolocation, WHOIS lookup, and abuse checking.
- Geolocation Consultation: Retrieve geolocation information for a given IP address.
- AbuseIPDB Consultation: Check if an IP address has been listed as abusive on AbuseIPDB.
- WHOIS Consultation: Obtain WHOIS information for an IP address.
- IPinfo Consultation: Gather general information about an IP address using the IPinfo API.
- Python 3
- Necessary Python libraries:
requests
,whois
- Ensure you have Python 3 installed on your system.
- Install the required Python libraries using pip:
pip install requests whois
- Obtain API keys for the AbuseIPDB API and IPinfo API.
- Create a file named
ips.txt
containing the list of IP addresses you want to analyze, with each IP address on a new line. - Replace the placeholder API keys (
XXXXX
) with your actual API keys in the script. - Run the script using the following command:
python whois_abuseipdb.py
- View the results printed in the console.
- Make sure to handle API rate limits and usage restrictions according to the terms of service of each API provider.
- For more information about each API and its usage, refer to the respective documentation:
- AbuseIPDB API Documentation
- IPinfo API Documentation