2020 TrustedDomain ,
2121 User ,
2222 )
23+ from dissect .database .ese .ntds .objects .organizationalunit import OrganizationalUnit
2324 from dissect .database .ese .ntds .pek import PEK
2425
2526
@@ -83,19 +84,23 @@ def search(self, **kwargs: str) -> Iterator[Object]:
8384
8485 def groups (self ) -> Iterator [Group ]:
8586 """Get all group objects from the database."""
86- yield from self .search (objectCategory = "group" )
87+ yield from self .search (objectClass = "group" )
8788
8889 def servers (self ) -> Iterator [Server ]:
8990 """Get all server objects from the database."""
90- yield from self .search (objectCategory = "server" )
91+ yield from self .search (objectClass = "server" )
9192
9293 def users (self ) -> Iterator [User ]:
9394 """Get all user objects from the database."""
9495 yield from self .search (objectCategory = "person" , objectClass = "user" )
9596
9697 def computers (self ) -> Iterator [Computer ]:
9798 """Get all computer objects from the database."""
98- yield from self .search (objectCategory = "computer" )
99+ yield from self .search (objectClass = "computer" )
100+
101+ def domains (self ) -> Iterator [DomainDNS ]:
102+ """Get all domain objects from the database."""
103+ yield from self .search (objectClass = "domainDNS" )
99104
100105 def trusts (self ) -> Iterator [TrustedDomain ]:
101106 """Get all trust objects from the database."""
@@ -105,6 +110,10 @@ def group_policies(self) -> Iterator[GroupPolicyContainer]:
105110 """Get all group policy objects (GPO) objects from the database."""
106111 yield from self .search (objectClass = "groupPolicyContainer" )
107112
113+ def organizational_units (self ) -> Iterator [OrganizationalUnit ]:
114+ """Get all organizational unit (OU) objects from the database."""
115+ yield from self .search (objectClass = "organizationalUnit" )
116+
108117 def secrets (self ) -> Iterator [Secret ]:
109118 """Get all secret objects from the database."""
110119 yield from self .search (objectClass = "secret" )
0 commit comments