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

Method from_string

windows/security.py:807–826  ·  view source on GitHub ↗

Return a new :class:`SecurityDescriptor` from the ``SDDL``. :returns: :class:`SecurityDescriptor` .. warning:: At the moment the underliying buffer is never freed. See `ConvertStringSecurityDescriptorToSecurityDescriptorA <https://docs.microsoft.com/en-us/

(cls, sddl)

Source from the content-addressed store, hash-verified

805 # Constructors
806 @classmethod
807 def from_string(cls, sddl):
808 """Return a new :class:`SecurityDescriptor` from the ``SDDL``.
809
810 :returns: :class:`SecurityDescriptor`
811
812 .. warning::
813
814 At the moment the underliying buffer is never freed.
815
816 See `ConvertStringSecurityDescriptorToSecurityDescriptorA <https://docs.microsoft.com/en-us/windows/desktop/api/sddl/nf-sddl-convertstringsecuritydescriptortosecuritydescriptora>`_
817 """
818 self = cls()
819 winproxy.ConvertStringSecurityDescriptorToSecurityDescriptorA(
820 sddl.encode("ascii"),
821 gdef.SDDL_REVISION_1,
822 self,
823 None)
824 # TODO: we need to free this buffer..
825 # Keep track of Security Descritor state ?
826 return self
827
828 @classmethod
829 def _from_name_and_type(cls, objname, objtype, flags=DEFAULT_SECURITY_INFORMATION, query_sacl=False):

Callers 6

wintrust.pyFile · 0.45
createMethod · 0.45
create_instanceFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected