Difference between revisions of "Truxton .NET Core"
| Line 119: | Line 119: | ||
=The ETL Host= | =The ETL Host= | ||
| − | coming soon | + | ''coming soon'' |
=Dependency Injection= | =Dependency Injection= | ||
Revision as of 20:13, 16 November 2020
Truxton .NET Core builds upon the Truxton.ETL Managed API and introduces dotnet core features like dependency injection, configuration and idiomatic message consumer patterns.
It is recommended to use this SDK for most C# ETLs.
Contents
Overview
Truxton .NET Core runs against .Net Core 3.1 on windows 10 on 64-bit platforms (TargetFramework: netcoreapp3.1, RuntimeIdentifier: win10-x64).
Getting Started
Truxton .NET Core ETLs are simply .Net Core 3.1 console exes that include references to the the Truxton .NET Core libraries.
Prerequisites
You will first need to install the .NET Core 3.1 SDK. IMPORTANT You must choose the Windows x64 SDK. It is recommended to install using the windows installer. Here is a link to the latest 3.1 SDK - 3.1.404 (newer versions might be available when you read this).
Once you have the SDK installed, install Visual Studio 2019 Community.
Project Setup
Now lets choose the appropriate project style to begin building our ETL.
- First, Launch Visual Studio 2019 Community and select Create a New Project
- Select Language: C#, Platform: Windows, Project Type: Console. Choose the Console App (.NET Core) template and click Next
- Choose a suitable name and location for your ETL and click Create
Truxton DLL References
coming soon
Consuming Messages
HEADS UP: All of the interfaces listed in this section are found in the Truxton.Messaging.dll .Net Core library.
We now need to configure our ETL to accept certain kinds of information found when media is being processed and exploited. This is achieved by implementing one or more IETLMessageConsumer interfaces.
All consumers will have to implement the following properties:
/// <summary>
/// A Message consumer which consumes different kind of truxton messages
/// </summary>
public interface IETLMessageConsumer
{
/// <summary>
/// Which stage this consumer will take part in. Value should be between 1 and 255 and should adhere to Truxton.Messaging.Stages enum
/// </summary>
int Stage { get; }
/// <summary>
/// The name of this ETL
/// </summary>
string ApplicationName { get; }
/// <summary>
/// The message queue this ETL will identify as. Do not use spaces.
/// </summary>
string MessageQueueName { get; }
/// <summary>
/// The purpose of this ETL and what its trying to achieve
/// </summary>
string Description { get; }
/// <summary>
/// How this ETL should be further configured
/// </summary>
ETLOptions Options { get; }
}
/// <summary>
/// How to configure this consumer
/// </summary>
public class ETLOptions
{
/// <summary>
/// If the consumer should have verbose message logging
/// </summary>
public bool VerboseMessageLogging { get; set; }
/// <summary>
/// If the consumer should not load hashsets (this can speed up the ETL in certain circumstances)
/// </summary>
public bool DontEliminateByHash { get; set; }
}
The most common kind of IETLMessageConsumer is an IFileConsumer.
IFileConsumer
If your ETL implements the IFileConsumer interface it will receive messages when files are discovered when media is loading. See File_Types_Supported for the different kinds of Files that can be found or generated from media.
IArtifactConsumer
If your ETL implements the IArtifactConsumer interface it will receive messages pertaining to artifacts (also known as Entities) when media is being processed. See Entity_Types for the different kinds of Artifacts that could be exploited from media.
ICameraInfoConsumer
If your ETL implements the ICameraInfoConsumer interface it will receive messages pertaining to metadata like EXIFs information when media is being processed. Camera info could be to metadata generated from cameras - either static or video. See the EXIF_Table entry for information that can be exploited.
ICommunicationConsumer
If your ETL implements the ICommunicationConsumer interface it will receive messages pertaining to communications exploited from files like SMS, Chat Programs or Email. See Message_Types for the different kinds of Communications which can be exploited from media.
HEADS UP This consumer is still a work in progress.
IEventConsumer
If your ETL implements the IEventConsumer interface it will receive messages pertaining to notable points in time found in the media being processed. This is slated more towards notable events and not include 'noisy' timestamps like file created times. See Event_Types for the different kinds of Events which can be exploited from the media.
ILocationConsumer
If your ETL implements the ILocationConsumer interface it will receive messages pertaining to geographic coordinates found in the media being processed. See Location_Types for the different kinds of Locations which can be exploited from the media.
IRelationConsumer
If your ETL implements the IRelationConsumer interface it will receive messages pertaining to relations associated together in the media being processed.
ITagConsumer
If your ETL implements the ITagConsumer interface it will receive messages pertaining to tags being associated in the media being processed.
IWebsiteConsumer
If your ETL implements the IWebsiteConsumer interface it will receive messages pertaining to websites which were visited in the media being processed.
IMediaConsumer
If your ETL implements the IMediaConsumer interface it will receive messages pertaining to media that is progressing thru the load and exploited phases. See ETL_Stages for information about how media interacts with different stages and their states. This kind of consumer is useful when you want it 'run one' per loaded media.
IETL
The last consumer is a generic catch-all for all messages. You still have to configure which File_Types_Supported you care about and is generally only useful for compatibility with legacy etls.
The ETL Host
coming soon