Generated from Manticore v1.1.5 • 201 packages. View on pkg.go.dev

data_structures

import "github.com/TheManticoreProject/Manticore/windows/ms_dtyp/common/data_structures"

Index

Constants

Thursday, January 1, 1970 1:00:00 AM GMT+01:00 in 100-nanosecond intervals

const UnixTimestampIn100NsIntervals int64 = 116444736000000000

type EVENT\_DESCRIPTOR

The EVENT_DESCRIPTOR structure specifies the metadata that defines an event. Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-dtyp/a6110d36-28c1-4290-b79e-26aa95a0b1a0

type EVENT_DESCRIPTOR struct {
    Id      data_types.USHORT
    Version data_types.UCHAR
    Channel data_types.UCHAR
    Level   data_types.UCHAR
    Opcode  data_types.UCHAR
    Task    data_types.USHORT
    Keyword data_types.ULONGLONG
}

type EVENT\_HEADER

The EVENT_HEADER structure defines the main parameters of an event. Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-dtyp/fa4f7836-06ee-4ab6-8688-386a5a85f8c5

type EVENT_HEADER struct {
    Size            data_types.USHORT
    HeaderType      data_types.USHORT
    Flags           data_types.USHORT
    EventProperty   data_types.USHORT
    ThreadId        data_types.ULONG
    ProcessId       data_types.ULONG
    TimeStamp       LARGE_INTEGER
    ProviderId      GUID
    EventDescriptor EVENT_DESCRIPTOR
    KernelTime      data_types.ULONG
    UserTime        data_types.ULONG
    ProcessorTime   data_types.ULONG64
    ActivityId      GUID
}

type FILETIME

The FILETIME structure is a 64-bit value that represents the number of 100-nanosecond intervals that have elapsed since January 1, 1601, Coordinated Universal Time (UTC). Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-dtyp/2c57429b-fdd4-488f-b5fc-9e4cf020fcdf

type FILETIME struct {
    // dwLowDateTime: A 32-bit unsigned integer that contains the low-order bits of the file time.
    DwLowDateTime uint32
    // dwHighDateTime: A 32-bit unsigned integer that contains the high-order bits of the file time.
    DwHighDateTime uint32
}

func NewFILETIMEFromTime

func NewFILETIMEFromTime(t time.Time) *FILETIME

NewFILETIMEFromTime creates a new FILETIME structure from a time.Time value.

Parameters: - t: The time.Time value to create the FILETIME structure from

Returns: - A pointer to the new FILETIME structure

func (*FILETIME) GetTime

func (ft *FILETIME) GetTime() time.Time

GetTime returns the time represented by the FILETIME structure.

Returns: - The time represented by the FILETIME structure

func (*FILETIME) GetTimeString

func (ft *FILETIME) GetTimeString() string

GetTimeString returns the string representation of the FILETIME structure in UTC.

Returns: - The string representation of the FILETIME structure in UTC

func (*FILETIME) GetUnixTimestamp

func (ft *FILETIME) GetUnixTimestamp() int64

GetUnixTimestamp returns the Unix timestamp represented by the FILETIME structure.

Returns: - The Unix timestamp as an int64

func (*FILETIME) Marshal

func (ft *FILETIME) Marshal() ([]byte, error)

Marshal serializes the FILETIME structure into a byte slice. It converts the FILETIME structure into its binary representation according to the SMB protocol format.

Returns: - A byte slice containing the marshalled FILETIME structure

func (*FILETIME) String

func (ft *FILETIME) String() string

String returns the string representation of the FILETIME structure in UTC.

Returns: - The string representation of the FILETIME structure in UTC

func (*FILETIME) ToInt64

func (ft *FILETIME) ToInt64() int64

ToInt64 returns the int64 representation of the FILETIME structure.

Returns: - The int64 representation of the FILETIME structure

func (*FILETIME) Unmarshal

func (ft *FILETIME) Unmarshal(data []byte) (int, error)

Unmarshal deserializes a byte slice into the FILETIME structure.

Parameters: - data: A byte slice to be deserialized into the FILETIME structure

type GUID

GUID Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-dtyp/4926e530-816e-41c2-b251-ec5c7aca018a

type GUID = guid.GUID

type LARGE\_INTEGER

LARGE_INTEGER Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-dtyp/e904b1ba-f774-4203-ba1b-66485165ab1a

type LARGE_INTEGER struct {
    QuadPart data_types.ULONGLONG
}

type LCID

A language code identifier structure is stored as a DWORD. The lower word contains the language identifier, and the upper word contains both the sorting identifier (ID) and a reserved value. For additional details about the structure and possible values, see [MS-LCID]. Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-dtyp/e8e4255f-5b6d-472b-8a98-ae3950bfdb9a

type LCID = data_types.DWORD

type LPSERVER\_INFO\_100

type LPSERVER_INFO_100 *SERVER_INFO_100

type LUID

The LUID structure is 64-bit value guaranteed to be unique only on the system on which it was generated. The uniqueness of a locally unique identifier (LUID) is guaranteed only until the system is restarted. Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-dtyp/48cbee2a-0790-45f2-8269-931d7083b2c3

type LUID struct {
    // LowPart: The low-order bits of the structure.
    LowPart data_types.DWORD
    // HighPart: The high-order bits of the structure.
    HighPart data_types.LONG
}

type MULTI\_SZ

The MULTI_SZ structure defines an implementation-specific type that contains a sequence of null-terminated strings, terminated by an empty string (\0) so that the last two characters are both null terminators. Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-dtyp/fd7b2d81-b1d7-414f-a3df-c66fabc578db

type MULTI_SZ struct {
    // Value: A data buffer, which is a string literal containing multiple null-terminated strings serially.
    Value data_types.WCHAR
    // NChar: The length, in characters, including the two terminating nulls.
    NChar data_types.DWORD
}

type OBJECT\_TYPE\_LIST

OBJECT_TYPE_LIST Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-dtyp/6f04f1f2-d070-4f70-aae7-5f98ed63e1ba

type OBJECT_TYPE_LIST struct {
    // Level: Specifies the level of the object type in the hierarchy of an object and its sub-objects. Level zero
    // indicates the object itself. Level one indicates a sub-object of the object, such as a property set. Level two
    // indicates a sub-object of the level one sub-object, such as a property. There can be a maximum of five levels
    // numbered zero through four.
    Level data_types.WORD
    // Remaining: Remaining access bits for this element, used by the access check algorithm, as specified in section 2.5.3.2.
    Remaining data_types.UINT32 // data_types.ACCESS_MASK
    // ObjectType: A pointer to the GUID for the object or sub-object.
    ObjectType *GUID
}

type PEVENT\_HEADER

type PEVENT_HEADER *EVENT_HEADER

type PLARGE\_INTEGER

type PLARGE_INTEGER *LARGE_INTEGER

type PLUID

type PLUID *LUID

type PMULTI\_SZ

type PMULTI_SZ *MULTI_SZ

type POBJECT\_TYPE\_LIST

type POBJECT_TYPE_LIST *OBJECT_TYPE_LIST

type PRPC\_UNICODE\_STRING

type PRPC_UNICODE_STRING *RPC_UNICODE_STRING

type PSERVER\_INFO\_100

type PSERVER_INFO_100 *SERVER_INFO_100

type PSYSTEMTIME

type PSYSTEMTIME *SYSTEMTIME

type PUINT128

type PUINT128 *UINT128

type PULARGE\_INTEGER

type PULARGE_INTEGER *ULARGE_INTEGER

type RPC\_UNICODE\_STRING

RPC_UNICODE_STRING Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-dtyp/94a16bb6-c610-4cb9-8db6-26f15f560061

type RPC_UNICODE_STRING struct {
    // Length: The length, in bytes, of the string pointed to by the Buffer member.
    // The length MUST be a multiple of 2. The length MUST equal the entire size of the buffer.
    Length data_types.WORD
    // MaximumLength: The maximum size, in bytes, of the string pointed to by Buffer. The size MUST be a multiple of 2.
    // If not, the size MUST be decremented by 1 prior to use. This value MUST not be less than Length.
    MaximumLength data_types.WORD
    // Buffer: A pointer to a string buffer. The string pointed to by the buffer member MUST NOT include a terminating null character.
    Buffer data_types.WCHAR
}

type SERVER\_INFO\_100

SERVER_INFO_100 Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-dtyp/007c654b-7d78-49d4-9f4d-0da7c1889727

type SERVER_INFO_100 struct {
    // Sv100PlatformId: The platform ID.
    Sv100PlatformId data_types.DWORD
    // Sv100Name: The server name.
    Sv100Name data_types.WCHAR
}

type SERVER\_INFO\_101

SERVER_INFO_101 Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-dtyp/39c502dd-022b-4a68-9367-89fd76a23bc3

type SERVER_INFO_101 struct {
    // sv101_platform_id: Specifies the information level to use for platform-specific information.
    Sv101PlatformId data_types.DWORD
    // sv101_name: A pointer to a null-terminated Unicode UTF-16 Internet host name or NetBIOS host name of a server.
    Sv101Name data_types.STRING
    // sv101_version_major: Specifies the major release version number of the operating system. The server MUST set this
    // field to an implementation-specific major release version number that corresponds to the host operating system as
    // specified in the following table.
    Sv101VersionMajor data_types.DWORD
    // sv101_version_minor: Specifies the minor release version number of the operating system. The server MUST set this
    // field to an implementation-specific minor release version number that corresponds to the host operating system as
    // specified in the following table.
    Sv101VersionMinor data_types.DWORD
    // sv101_version_type: The sv101_version_type field specifies the SV_TYPE flags, which indicate the software services
    // that are available (but not necessarily running) on the server. This member MUST be a combination of one or more of
    // the following values.
    Sv101VersionType data_types.DWORD
    // sv101_comment: A pointer to a null-terminated Unicode UTF-16 string that specifies a comment that describes the server.
    Sv101Comment data_types.STRING
}

type SYSTEMTIME

SYSTEMTIME Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-dtyp/2fefe8dd-ab48-4e33-a7d5-7171455a9289

type SYSTEMTIME struct {
    // WYear: The year.
    WYear data_types.WORD
    // WMonth: The month.
    WMonth data_types.WORD
    // WDayOfWeek: The day of the week.
    WDayOfWeek data_types.WORD
    // WDay: The day.
    WDay data_types.WORD
    // WHour: The hour.
    WHour data_types.WORD
    // WMinute: The minute.
    WMinute data_types.WORD
    // WSecond: The second.
    WSecond data_types.WORD
    // WMilliseconds: The milliseconds.
    WMilliseconds data_types.WORD
}

type UINT128

UINT128 Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-dtyp/3b5c1a61-ece4-4dce-9c9f-c15388ba9032

type UINT128 struct {
    // Lower: The lower 64 bits of the 128-bit value.
    Lower data_types.UINT64
    // Upper: The upper 64 bits of the 128-bit value.
    Upper data_types.UINT64
}

type ULARGE\_INTEGER

ULARGE_INTEGER Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-dtyp/d37e0ce7-a358-4c07-a5c4-59c8b5da8b08

type ULARGE_INTEGER struct {
    // QuadPart: The 64-bit value.
    QuadPart data_types.UINT64
}