Code Monkey home page Code Monkey logo

abuseipdb-ip-scanner's Introduction

AbuseIPDB IP Scanner

This Python script utilizes the AbuseIPDB API to check the malicious activity of IP addresses listed in a CSV file. It retrieves information such as ISP, country, number of abuse reports, and abuse confidence score for each IP address within the last 90 days.

Requirements

  • Python 3.x
  • requests library
  • Install the required Python package using pip:
pip install requests

Description

  1. API Key Setup:

    • Requires a valid AbuseIPDB API key (apikey) to authenticate requests.
  2. Function check_ip:

    • Sends a GET request to AbuseIPDB for each IP address in the list.
    • Retrieves and parses the JSON response to extract details such as 'Country', 'ISP', 'Total No of Reports', 'Distinct Users', 'Usage Type', 'Domain', and 'Abuse Confidence Score'.
  3. CSV Handling:

    • Reads a CSV file (IP_list.csv) containing a list of IP addresses.
    • Writes the scan results to another CSV file (IP_score.csv) with columns for 'IP Address', 'Country', 'ISP', 'Total No of Reports', 'Distinct Users', 'Usage Type', 'Domain', and 'Abuse Confidence Score'.
  4. Performs API requests with error handling for API rate limits, and JSON parsing errors.

Usage

  1. Replace apikey with your own AbuseIPDB API key.
  2. Prepare a CSV file (IP_list.csv) with a header row and IP addresses listed under the 'IP Address' column.
  3. Adjust file paths (input_file, output_file) as per your local directory structure.
  4. Run the script to initiate the scanning process.
python AbuseIPDB_ip_scan.py
  1. Monitor the console for progress updates and any encountered errors.

For detailed information and updates, refer to the AbuseIPDB API Documentation.

abuseipdb-ip-scanner's People

Contributors

ph1nx avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.