extract_msg.structures.entry_id Module

Module contents

class extract_msg.structures.entry_id.AddressBookEntryID(data: bytes)[source]

Bases: EntryID

An Address Book EntryID structure, as specified in [MS-OXCDATA].

property position: int

Used to tell the amount of bytes read in this EntryID. Useful for EntryID data that has been chained together with no separator.

property type: AddressBookType

The type of the object.

property version: int

The version. MUST be 1.

property X5000DN: bytes

The X500 DN of the Address Book object.

class extract_msg.structures.entry_id.ContactAddressEntryID(data: bytes)[source]

Bases: EntryID

A Contact Address EntryID structure, as defined in [MS-OXCDATA]. Specifies a set of data representing recipients whose information is stored in a Contact object.

property entryID: MessageEntryID

The EntryID contained in this object.

property entryIDCount: int

The size, in bytes, of the EntryID contained in this object.

property index: ContactAddressIndex

The electronic address in the contact information to use.

property position: int

Used to tell the amount of bytes read in this EntryID. Useful for EntryID data that has been chained together with no separator.

class extract_msg.structures.entry_id.EntryID(data: bytes)[source]

Bases: ABC

Base class for all EntryID structures. Use :classmethod autoCreate: to automatically create the correct EntryID structure type from the specified data.

classmethod autoCreate(data: bytes | None) EntryID | None[source]

Automatically determines the type of EntryID and returns an instance of the correct subclass. If the subclass cannot be determined, will return a plain EntryID instance.

toBytes() bytes[source]
property flags: bytes

The flags for this Entry ID.

property entryIDType: EntryIDType | bytes

Returns an instance of EntryIDType corresponding to the provider UID of this EntryID. If none is found, returns the bytes.

property longTerm: bool

Whether the EntryID is long term or not.

abstract property position: int

Used to tell the amount of bytes read in this EntryID. Useful for EntryID data that has been chained together with no separator.

property providerUID: bytes

The 16 byte UID that identifies the type of Entry ID.

class extract_msg.structures.entry_id.FolderEntryID(data: bytes)[source]

Bases: EntryID

A Folder EntryID structure, as defined in [MS-OXCDATA].

property databaseGuid: str

A GUID associated with the Store Object and corresponding to the ReplicaID field of the FID structure.

property folderType: MessageType

The type of folder.

property globalCounter: int

An unsigned integer identifying the folder.

property position: int

Used to tell the amount of bytes read in this EntryID. Useful for EntryID data that has been chained together with no separator.

class extract_msg.structures.entry_id.MessageEntryID(data: bytes)[source]

Bases: EntryID

A Message EntryID structure, as defined in [MS-OXCDATA].

property folderDatabaseGuid: str

A GUID associated with the Store object of the folder in which the message resides and corresponding to the ReplicaId field in the folder ID structure.

property folderGlobalCounter: int

An unsigned integer identifying the folder in which the message resides.

property messageDatabaseGuid: str

A GUID associated with the Store object of the message and corresponding to the ReplicaId field of the Message ID structure.

property messageGlobalCounter: int

An unsigned integer identifying the message.

property messageType: MessageType

The Store object type.

property position: int

Used to tell the amount of bytes read in this EntryID. Useful for EntryID data that has been chained together with no separator.

class extract_msg.structures.entry_id.NNTPNewsgroupFolderEntryID(data: bytes)[source]

Bases: EntryID

A NNTP Newsgroup Folder EntryID structure, as defined in [MS-OXCDATA].

property folderType: int

The type of folder. MUST be 0x000C.

property newsgroupName: bytes

The name of the newsgroup, as an ANSI string.

property position: int

Used to tell the amount of bytes read in this EntryID. Useful for EntryID data that has been chained together with no separator.

class extract_msg.structures.entry_id.OneOffRecipient(data: bytes)[source]

Bases: EntryID

A One-Off EntryID structure, as specified in [MS-OXCDATA].

property addressType: str | bytes

The address type for this Recipient.

property areStringUnicode: bool

Whether or not the strings are in UTF-16 format.

property canLookup: bool

Whether the server can lookup the user’s email in the address book.

property displayName: str | bytes

The display name for this Recipient.

property emailAddress: str | bytes

The email address for this Recipient.

property format: OORBodyFormat

The message body format desired for this recipient.

property macintoshEncoding: MacintoshEncoding

The encoding used for Macintosh-specific data attachments.

property messageFormat: MessageFormat

The message format to use for messages sent to this recipient.

property position: int

Used to tell the amount of bytes read in this EntryID. Useful for EntryID data that has been chained together with no separator.

class extract_msg.structures.entry_id.PermanentEntryID(data: bytes)[source]

Bases: EntryID

A Permanent EntryID structure, as defined in [MS-OXNSPI].

property displayTypeString: DisplayType

Returns the display type string value.

property distinguishedName: str

Returns the distinguished name.

property position: int

Used to tell the amount of bytes read in this EntryID. Useful for EntryID data that has been chained together with no separator.

class extract_msg.structures.entry_id.PersonalDistributionListEntryID(data: bytes)[source]

Bases: EntryID

A Personal Distribution List EntryID structure, as defined in [MS-OXCDATA].

property entryID: MessageEntryID

The EntryID contained in this object.

property entryIDCount: int

The size, in bytes, of the EntryID contained in this object.

property position: int

Used to tell the amount of bytes read in this EntryID. Useful for EntryID data that has been chained together with no separator.

class extract_msg.structures.entry_id.StoreObjectEntryID(data: bytes)[source]

Bases: EntryID

A Store Object EntryID structure, as defined in [MS-OXCDATA].

property dllFileName: bytes

Must be set to b’emsmdb.dllx00x00x00x00’.

property flag: int
property mailboxDN: str | None

A string representing the X500 DN of the mailbox, as specified in [MS-OXOAB]. THis field is present only for mailbox databases.

property position: int

Used to tell the amount of bytes read in this EntryID. Useful for EntryID data that has been chained together with no separator.

property serverShortname: bytes

A string of single-byte characters indicating the short name or NetBIOS name of the server.

property version: int
property wrappedProviderUID: bytes
property wrappedType: WrappedType

Determined by where the folder is located.

class extract_msg.structures.entry_id.WrappedEntryID(data: bytes)[source]

Bases: EntryID

A WrappedEntryId structure, as specified in [MS-OXOCNTC].

property embeddedEntryID: EntryID

The embedded EntryID of this object.

property embeddedIsOneOff: bool

Whether the embedded EntryID is a One-Off EntryID.

property position: int

Used to tell the amount of bytes read in this EntryID. Useful for EntryID data that has been chained together with no separator.

property type: int

The type bits of this object.