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

Method get_security_descriptor

windows/winobject/process.py:480–488  ·  view source on GitHub ↗
(self,  query_sacl=False, flags=security.SecurityDescriptor.DEFAULT_SECURITY_INFORMATION)

Source from the content-addressed store, hash-verified

478 token = property(open_token, doc="The process :class:`~windows.winobject.token.Token`")
479
480 def get_security_descriptor(self, query_sacl=False, flags=security.SecurityDescriptor.DEFAULT_SECURITY_INFORMATION):
481 open_flags = gdef.READ_CONTROL
482 if query_sacl:
483 open_flags |= gdef.ACCESS_SYSTEM_SECURITY
484 tmp_handle = windows.winproxy.OpenProcess(open_flags, 0, self.pid)
485 try:
486 return security.SecurityDescriptor.from_handle(tmp_handle, query_sacl=query_sacl, flags=flags, obj_type="process")
487 finally:
488 windows.winproxy.CloseHandle(tmp_handle)
489
490
491 def set_security_descriptor(self, sd):

Callers

nothing calls this directly

Calls 1

from_handleMethod · 0.45

Tested by

no test coverage detected