AbuseIPDB 1.2.2
See the version list below for details.
dotnet add package AbuseIPDB --version 1.2.2
NuGet\Install-Package AbuseIPDB -Version 1.2.2
<PackageReference Include="AbuseIPDB" Version="1.2.2" />
paket add AbuseIPDB --version 1.2.2
#r "nuget: AbuseIPDB, 1.2.2"
// Install AbuseIPDB as a Cake Addin #addin nuget:?package=AbuseIPDB&version=1.2.2 // Install AbuseIPDB as a Cake Tool #tool nuget:?package=AbuseIPDB&version=1.2.2
AbuseIPDB ⛔
An async C# library for interacting with the v2 AbuseIPDB API.
Usage
Provides an easy interface for interacting with the AbuseIPDB API. The most useful features is IP address reporting and checking.
To get started, add 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.
Features
- Built for .NET 6 and .NET 7
- Fully async
- Full coverage of the FREE and Premium v2 API
- Extensive XML documentation
- No external dependencies (uses integrated HTTP and JSON)
- Easily lookup IP addresses and report abuse
- Custom exceptions (
AbuseIPDBException
) for advanced catching - Parsing of server errors
- Automatic request retries
- Example project to demonstrate all capabilities of the library
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");
Available methods
- Task<BlacklistedIP[]> GetBlacklist( int limit = 10000, int? confidenceMinimum = null, string[] onlyCountries = null, string[] exceptCountries = null)
- Task<BulkReport> BulkReport(Stream csvStream)
- Task<ClearedAddress> ClearAddress(string ip)
- Task<CheckedBlock> CheckBlock(string network, int maxAge)
- Task<CheckedIP> Check(string ip, bool verbose = true, int maxAge = 90)
- Task<IPReport[]> GetReports(string ip, int limit = 100, int maxAge = 90)
- Task<ReportedIP> Report(string ip, IPReportCategory[] categories, string comment)
References
- Official Website: https://www.abuseipdb.com
This is a community-ran library. Not affiliated with Marathon Studios, Inc.
Product | Versions 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 was computed. 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. |
-
net6.0
- No dependencies.
-
net7.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.