Skip to content

Repository files navigation

Netcraft

An async and lightweight C# library for interacting with the Netcraft API.

Usage

This library provides an easy interface for interacting with the Netcraft API. Most importantly, it empowers you to seamlessly automate the reporting of malicious URLs and emails to Netcraft.

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

dotnet add package Netcraft

For the primary classes to become available, import one or more of the used namespaces.

usingNetcraft;usingNetcraft.Modules;usingNetcraft.Entities;

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
  • Extensive XML documentation
  • No external dependencies (makes use of built-in HttpClient and JsonSerializer)
  • Custom exceptions (NetcraftException) for easy debugging
  • Parsing of custom Netcraft errors
  • Example project to demonstrate all capabilities of the library

Features

  • Report malicious URLs, emails and misclassifications
  • Request details about existing submissions
  • Fetch the reporter leaderboard

Code Samples

Initializing a new API client

NetcraftClientclient=new();

Reporting malicious URLs

stringuuid=awaitclient.Report.Urls(email,"Phishing against the Turkish Government.",newUrlReportParmeters[]{new(){Value="http://basvuruedevletmobilden.ml/",Country="US"}});

Getting submission details

Submissionsubmission=awaitclient.Submission.GetSubmissionDetails(uuid);

Getting the leaderboard

LeaderboardEntry[]entries=awaitclient.Misc.GetLeaderboard();

References

This is a community-ran library. Not affiliated with Netcraft Ltd.

About

An async and lightweight C# library for interacting with the Netcraft API.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages