TAXII2Sharp.Client is a C# .NET Standard implementation of the TAXII2 specifications for retrieving STIX structured data from a TAXII Endpoint.
For more information on the TAXII Specifications, please see the References section below.
For more information on the STIX specifications, please see the References section below.
using System;
using System.Collections.Generic;
// Please note that the client version to be imported is dependent on the TAXII Standard version run by the server
using TAXIISharp2.Client.V20;
...
// Create a server
Server endpoint = new Server("https://somesite.org/taxii");
// Get a list of the APIRoot endpoints provided by that server
List<APIRoots> APIRoots = endpoint.GetAPIRoots();
// Iterate over the APIRoot objects
foreach (APIRoot root in APIRoots)
{
// Iterate over the Collection hosted at that APIRoot
foreach (Collection collection in root.Collections)
{
// Get the STIX objects that the collection contains
var Objects = collection.GetObjects();
Console.WriteLine("Total objects in collection: {0}", Objects.Objects.Length);
}
}
For additional information, please see the example included in the project
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.