mirror of
https://github.com/microsoft/krabsetw
synced 2026-06-06 16:14:32 +00:00
c81c3c41f6
* - Make projects for Managed and Native example code. - Create a 'tests' directory. - Remove SampleCSharpKrabsExe as it is redundant with respect to the example code. Signed-off-by: Zac Brown (ODSP SECURITY) <zbrown@microsoft.com> * - Add note about TYPEASSERT and NDEBUG compilation flags to README.md. - Add /W4 /WX compiler flags to NativeExample project. - vcxproj.filters updates based on VS magic. Signed-off-by: Zac Brown (ODSP SECURITY) <zbrown@microsoft.com>
35 lines
1.1 KiB
C#
35 lines
1.1 KiB
C#
// Copyright (c) Microsoft. All rights reserved.
|
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
|
|
using System;
|
|
using O365.Security.ETW.Testing;
|
|
|
|
namespace EtwTestsCS.Events
|
|
{
|
|
public static class PowerShellEvent
|
|
{
|
|
public readonly static string UserData = "UserData";
|
|
public readonly static string ContextInfo = "ContextInfo";
|
|
public readonly static string Payload = "Payload";
|
|
|
|
public readonly static Guid ProviderId = Guid.Parse("a0c1853b-5c40-4b15-8766-3cf1c58f985a");
|
|
public readonly static int EventId = 7937;
|
|
public readonly static int Version = 1;
|
|
|
|
public static SynthRecord CreateRecord(
|
|
string userData,
|
|
string contextInfo,
|
|
string payload)
|
|
{
|
|
using (var rb = new RecordBuilder(ProviderId, EventId, Version))
|
|
{
|
|
rb.AddUnicodeString(UserData, userData);
|
|
rb.AddUnicodeString(ContextInfo, contextInfo);
|
|
rb.AddUnicodeString(Payload, payload);
|
|
|
|
return rb.Pack();
|
|
}
|
|
}
|
|
}
|
|
}
|