MCPcopy Create free account
hub / github.com/ELMERIKH/PyinMemoryPE / __iter__

Method __iter__

windows/winobject/object_manager.py:141–152  ·  view source on GitHub ↗

Iter over the list of name in the Directory object. :yield: :class:`str` -- The names of objects in the directory. .. note:: the :class:`KernelObject` must be of type ``Directory`` or it will raise :class:`~windows.generated_def.ntstatus.NtStatusException`

(self)

Source from the content-addressed store, hash-verified

139 yield v.Name.str, v.TypeName.str
140
141 def __iter__(self):
142 """Iter over the list of name in the Directory object.
143
144 :yield: :class:`str` -- The names of objects in the directory.
145
146 .. note::
147
148 the :class:`KernelObject` must be of type ``Directory`` or
149 it will raise :class:`~windows.generated_def.ntstatus.NtStatusException` with
150 code :data:`~windows.generated_def.STATUS_OBJECT_TYPE_MISMATCH`
151 """
152 return (name for name, type in self._directory_query_generator())
153
154 def __repr__(self):
155 return """<{0} "{1}" (type="{2}")>""".format(type(self).__name__, self.fullname, self.type)

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected