This python tool allows you to verify a list of IP addresses against the AbuseIPDB API. It checks each IP for reported abuse incidents, provides a detailed report, and saves the results in both a CSV file and a formatted table in the console.
- Python 3.7 or higher
- A IPDBAbuse API API key (register on abuseipdb.com)
-
Clone the Repository
https://github.com/hbourget/IPDBAbuseAPI.git cd IPDBAbuseAPI
-
Create a Virtual Environment (Optional but Recommended)
python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Dependencies
pip install -r requirements.txt
-
Obtain an AbuseIPDB API Key
- Sign up at AbuseIPDB to get your API key.
-
Set Up Environment Variables
-
Create a
.env
file in the project root directory:touch .env
-
Add your API key to the
.env
file:IPDBABUSE_API_KEY=your_abuseipdb_api_key_here
Note: Ensure that
.env
is listed in your.gitignore
to prevent exposing your API key. -
-
Prepare the IPs to check
-
Create a file named
ips_to_check.txt
in the project root directory. -
List the IP addresses you want to check, one per line. For example:
192.168.1.1 8.8.8.8 1.1.1.1
-
-
Run the Script
python main.py
-
View the Results
- The script will display a formatted table in the console.
- Results will also be saved to
results.csv
in the project directory.
CSV File:
- File name:
results.csv
- Columns:
- Timestamp
- IP Address
- Reported?
- Report Count
- Abuse Confidence Score
Example:
Timestamp,IP Address,Reported?,Report Count,Abuse Confidence Score
2025-01-22 14:30:00,192.168.1.1,No,0, 0
2025-01-22 14:30:01,8.8.8.8,Yes,5,75
2025-01-22 14:30:02,1.1.1.1,No,0,0
This project is licensed under the MIT License.