def from_buffer(buff): ace = ACCESS_ALLOWED_CALLBACK_ACE() ace.Header = ACEHeader.from_buffer(buff) ace.Mask = ADS_ACCESS_MASK( int.from_bytes(buff.read(4), 'little', signed=False)) ace.Sid = SID.from_buffer(buff) ace.ApplicationData = buff.read( ) #not really sure, this will consume the whole buffer! (but we dont know the size at this point!) return ace
def from_buffer(buff): ace = ACCESS_DENIED_OBJECT_ACE() ace.Header = ACEHeader.from_buffer(buff) ace.Mask = ADS_ACCESS_MASK(int.from_bytes(buff.read(4), 'little', signed = False)) ace.Flags = ACCESS_ALLOWED_OBJECT_Flags(int.from_bytes(buff.read(4), 'little', signed = False)) if ace.Flags & ACCESS_ALLOWED_OBJECT_Flags.ACE_OBJECT_TYPE_PRESENT: ace.ObjectType = GUID.from_buffer(buff) if ace.Flags & ACCESS_ALLOWED_OBJECT_Flags.ACE_INHERITED_OBJECT_TYPE_PRESENT: ace.InheritedObjectType = GUID.from_buffer(buff) ace.Sid = SID.from_buffer(buff) return ace
def from_buffer(buff): ace = SYSTEM_AUDIT_CALLBACK_OBJECT_ACE() ace.Header = ACEHeader.from_buffer(buff) ace.Mask = ADS_ACCESS_MASK(int.from_bytes(buff.read(4), 'little', signed = False)) ace.Flags = ACCESS_ALLOWED_OBJECT_Flags(int.from_bytes(buff.read(4), 'little', signed = False)) if ace.Flags & ACCESS_ALLOWED_OBJECT_Flags.ACE_OBJECT_TYPE_PRESENT: ace.ObjectType = GUID.from_buffer(buff) if ace.Flags & ACCESS_ALLOWED_OBJECT_Flags.ACE_INHERITED_OBJECT_TYPE_PRESENT: ace.InheritedObjectType = GUID.from_buffer(buff) ace.Sid = SID.from_buffer(buff) ace.ApplicationData = buff.read() #not really sure, this will consume the whole buffer! (but we dont know the size at this point!) return ace
def from_buffer(buff): ace = SYSTEM_SCOPED_POLICY_ID_ACE() ace.Header = ACEHeader.from_buffer(buff) ace.Mask = ADS_ACCESS_MASK(int.from_bytes(buff.read(4), 'little', signed = False)) ace.Sid = SID.from_buffer(buff) return ace
def from_buffer(buff): ace = SYSTEM_MANDATORY_LABEL_ACE() ace.Header = ACEHeader.from_buffer(buff) ace.Mask = ADS_ACCESS_MASK(int.from_bytes(buff.read(4), 'little', signed = False)) ace.Sid = SID.from_buffer(buff) return ace