dissect.database.ese.ntds.schema¶
Module Contents¶
Classes¶
An index for schema entries providing fast lookups by various keys. |
Functions¶
Parse a prefix map. |
|
Decode a BER encoded OID. |
Attributes¶
- dissect.database.ese.ntds.schema.BOOTSTRAP_COLUMNS = [('DNT', 'DNT_col', 524297), ('Pdnt', 'PDNT_col', 524297), ('Obj', 'OBJ_col', 524296),...¶
- dissect.database.ese.ntds.schema.BOOTSTRAP_ATTRIBUTES = [('objectClass', 0, 524290, False), ('cn', 3, 524300, True), ('isDeleted', 131120, 524296,...¶
- dissect.database.ese.ntds.schema.BOOTSTRAP_OBJECT_CLASSES¶
- dissect.database.ese.ntds.schema.BOOTSTRAP_OID_PREFIXES¶
- class dissect.database.ese.ntds.schema.AttributeEntry¶
Bases:
NamedTuple- dnt: int¶
- id: int¶
- name: str¶
- column: str¶
- syntax: int¶
- om_syntax: int | None¶
- is_single_valued: bool¶
- link_id: int | None¶
- search_flags: dissect.database.ese.ntds.util.SearchFlags | None¶
- class dissect.database.ese.ntds.schema.Schema¶
An index for schema entries providing fast lookups by various keys.
Provides efficient lookups for schema entries by DNT, OID, ATTRTYP, LDAP display name, and column name.
- load(db: dissect.database.ese.ntds.database.Database) None¶
Load the classes and attributes from the database into the schema index.
- Parameters:
db – The database instance to load the schema from.
- lookup_attribute(*, id: int | None = None, name: str | None = None, link_id: int | None = None, column: str | None = None) AttributeEntry | None¶
Lookup an attribute schema entry by an indexed field.
- Parameters:
id – The attribute ID to look up.
name – The LDAP display name to look up.
link_id – The link ID to look up.
column – The column name to look up.
- Returns:
The matching attribute schema entry or
Noneif not found.
- lookup_class(*, id: int | None = None, name: str | None = None) ClassEntry | None¶
Lookup a class schema entry by an indexed field.
- Parameters:
id – The class ID to look up.
name – The LDAP display name to look up.
- Returns:
The matching class schema entry or
Noneif not found.
- lookup_oid(oid: str) ClassEntry | AttributeEntry | None¶
Lookup a schema entry by OID.
- Parameters:
oid – The OID to look up.
- Returns:
The matching schema entry or
Noneif not found.
- attrtyp_to_oid(attrtyp: int) str | None¶
Convert an ATTRTYP integer value to an OID string.
- Parameters:
attrtyp – The ATTRTYP integer value to convert.
- Returns:
The corresponding OID string or
Noneif the ATTRTYP does not correspond to a valid OID.
- lookup(*, dnt: int | None = None, oid: str | None = None, attrtyp: int | None = None, name: str | None = None) ClassEntry | AttributeEntry | None¶
Lookup a schema entry by an indexed field.
- Parameters:
dnt – The DNT (Distinguished Name Tag) of the schema entry to look up.
oid – The OID (Object Identifier) of the schema entry to look up.
attrtyp – The ATTRTYP (attribute type) of the schema entry to look up.
name – The LDAP display name of the schema entry to look up.
- Returns:
The matching schema entry or
Noneif not found.