AbuseIPDB 1.3.2

dotnet add package AbuseIPDB --version 1.3.2
NuGet\Install-Package AbuseIPDB -Version 1.3.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AbuseIPDB" Version="1.3.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AbuseIPDB --version 1.3.2
#r "nuget: AbuseIPDB, 1.3.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install AbuseIPDB as a Cake Addin
#addin nuget:?package=AbuseIPDB&version=1.3.2

// Install AbuseIPDB as a Cake Tool
#tool nuget:?package=AbuseIPDB&version=1.3.2

AbuseIPDB ⛔

alternate text is missing from this package README image

An async C# library for interacting with the v2 AbuseIPDB API.

Usage

This library provides an easy interface for interacting with the v2 AbuseIPDB API. You can use this on a server to automate your malicious IP adress reports or checks.

To get started, import the library into your solution with either the NuGet Package Manager or the dotnet CLI.

dotnet add package AbuseIPDB

For the primary classes to become available, import the used namespace.

using AbuseIPDB;

An API key is required to interact with the API. Create your own key at: https://www.abuseipdb.com/account/api

Need more examples? Under the Example directory you can find a working demo project that implements this library.

Properties

  • Built for .NET 8, .NET 7 and .NET 6
  • Fully async
  • Complete coverage of the FREE and Premium v2 API
  • Extensive XML documentation
  • No external dependencies (makes use of built-in HttpClient and JsonSerializer)
  • Custom exceptions (AbuseIPDBException) for easy debugging
  • Parsing of custom AbuseIPDB errors
  • Example project to demonstrate all capabilities of the library

Features

  • Lookup an existing IP address details and see the confidence of abuse
  • Retrieve past reports
  • Download a calculated IP address blacklist file
  • Easily report malicious IP addresses attacking your server
  • Check reported IP addresses within an entire CIDR block

Code Samples

Creating a new AbuseIPDB API client

AbuseIPDBClient client = new("API KEY");

Checking an IP

CheckedIP check = await client.Check("1.1.1.1", true, 90);

Reporting an abusive IP

ReportedIP report = await client.Report("127.0.0.1", new IPReportCategory[] { IPReportCategory.WebSpam, IPReportCategory.SSH }, "Test Report");

Bulk-reporting many IPs at once with a CSV stream

BulkReport bulkReport = await client.BulkReport(stream);

Requesting reports for an IP

IPReport[] reports = await client.GetReports("91.240.118.222", 300, 90);

Downloading a blacklist

BlacklistedIP[] ips = await client.GetBlacklist(10000);

Checking a CIDR block for recently reported IPs

CheckedBlock checkedBlock = await client.CheckBlock("186.2.163.0/24", 30);

Clearing reports on an IP

ClearedAddress cleared = await client.ClearAddress("127.0.0.1");

References

This is a community-ran library. Not affiliated with Marathon Studios, Inc.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.
  • net7.0

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.3.2 225 11/25/2023
1.3.1 77 11/25/2023
1.3.0 76 11/25/2023
1.2.3 321 2/19/2023
1.2.2 430 11/17/2022
1.2.1 297 11/15/2022
1.2.0 346 10/28/2022
1.1.0 389 9/23/2022
1.0.0 411 9/18/2022