Documentation ¶
Index ¶
- Constants
- Variables
- func AddMergeApprover(name string, mf mergefunc)
- func AttributeInfos() []attributeinfo
- func CompareAttributeValues(a, b AttributeValue) bool
- func CompareAttributeValuesInt(a, b AttributeValue) int
- func EdgeDirectionStrings() []string
- func EdgeInfos() []edgeInfo
- func Load(loaders []Loader, path string, cb ProgressCallbackFunc) ([]loaderobjects, error)
- func ObjectTypes() []objecttypeinfo
- func PostProcess(ao *Objects)
- func Process(ao *Objects, statustext string, l LoaderID, priority ProcessPriority) error
- func ProcessPriorityStrings() []string
- type ACE
- type ACEFlags
- type ACEType
- type ACL
- type Attribute
- func (a Attribute) Hidden() Attribute
- func (a Attribute) IsHidden() bool
- func (a Attribute) IsMeta() bool
- func (a Attribute) IsNonUnique() bool
- func (a Attribute) IsSingle() bool
- func (a Attribute) IsUnique() bool
- func (a Attribute) Merge() Attribute
- func (a Attribute) OnGet(onget AttributeGetFunc) Attribute
- func (a Attribute) OnSet(onset AttributeSetFunc) Attribute
- func (a Attribute) SetDescription(t string) Attribute
- func (a Attribute) Single() Attribute
- func (a Attribute) String() string
- func (a Attribute) Tag(t string) Attribute
- func (a Attribute) Type(t AttributeType) Attribute
- func (a Attribute) Unique() Attribute
- type AttributeAndValues
- type AttributeGetFunc
- type AttributePair
- type AttributeSetFunc
- type AttributeType
- type AttributeValue
- type AttributeValueBool
- type AttributeValueGUID
- type AttributeValueInt
- type AttributeValueObject
- type AttributeValuePair
- type AttributeValueSID
- type AttributeValueSecurityDescriptor
- type AttributeValueString
- type AttributeValueTime
- type AttributeValues
- type AttributesAndValues
- func (avm *AttributesAndValues) Clear(a Attribute)
- func (avm *AttributesAndValues) Get(a Attribute) (av AttributeValues, found bool)
- func (avm *AttributesAndValues) Iterate(f func(attr Attribute, values AttributeValues) bool)
- func (avm *AttributesAndValues) Len() int
- func (avm *AttributesAndValues) Merge(avm2 *AttributesAndValues) *AttributesAndValues
- func (avm *AttributesAndValues) Set(a Attribute, av AttributeValues)
- type Connection
- type Edge
- func (p Edge) DefaultF() bool
- func (p Edge) DefaultL() bool
- func (p Edge) DefaultM() bool
- func (pm Edge) Describe(description string) Edge
- func (p Edge) HasTag(t string) bool
- func (p Edge) Hidden() Edge
- func (p Edge) IsHidden() bool
- func (pm Edge) Probability(source, target *Object, edges *EdgeBitmap) Probability
- func (pm Edge) RegisterProbabilityCalculator(doCalc ProbabilityCalculatorFunction) Edge
- func (p Edge) SetDefault(f, m, l bool) Edge
- func (p Edge) String() string
- func (p Edge) Tag(t string) Edge
- type EdgeAnalyzer
- type EdgeBitmap
- func (eb *EdgeBitmap) AtomicAnd(edges EdgeBitmap)
- func (eb *EdgeBitmap) AtomicClear(edge Edge)
- func (eb *EdgeBitmap) AtomicOr(edges EdgeBitmap)
- func (eb *EdgeBitmap) AtomicSet(edge Edge)
- func (eb EdgeBitmap) Clear(edge Edge) EdgeBitmap
- func (eb EdgeBitmap) Count() int
- func (eb EdgeBitmap) Edges() []Edge
- func (eb EdgeBitmap) Intersect(edges EdgeBitmap) EdgeBitmap
- func (eb EdgeBitmap) Invert() EdgeBitmap
- func (eb EdgeBitmap) IsBlank() bool
- func (m *EdgeBitmap) IsSet(edge Edge) bool
- func (m EdgeBitmap) JoinedString() string
- func (m *EdgeBitmap) MaxProbability(source, target *Object) Probability
- func (eb EdgeBitmap) Merge(edges EdgeBitmap) EdgeBitmap
- func (eb *EdgeBitmap) PartialAtomicLoad() (edges EdgeBitmap)
- func (eb EdgeBitmap) Set(edge Edge) EdgeBitmap
- func (m EdgeBitmap) StringSlice() []string
- func (eb EdgeBitmap) ToStringSlice() []string
- type EdgeConnections
- type EdgeConnectionsPlus
- type EdgeDirection
- type Flags
- type Index
- type Loader
- type LoaderEstimator
- type LoaderGenerator
- type LoaderID
- type Mask
- type MultiIndex
- type Object
- func (o *Object) Absorb(source *Object)
- func (target *Object) AbsorbEx(source *Object, fast bool)
- func (o *Object) Add(a Attribute, values ...AttributeValue)
- func (o *Object) Adopt(child *Object)
- func (o *Object) Attr(attr Attribute) AttributeValues
- func (o *Object) AttrBool(attr Attribute) (bool, bool)
- func (o *Object) AttrInt(attr Attribute) (int64, bool)
- func (o *Object) AttrIterator(f func(attr Attribute, avs AttributeValues) bool)
- func (o *Object) AttrRendered(attr Attribute) AttributeValues
- func (o *Object) AttrString(attr Attribute) []string
- func (o *Object) AttrTime(attr Attribute) (time.Time, bool)
- func (o *Object) ChildOf(parent *Object)
- func (o *Object) Children() ObjectSlice
- func (o *Object) Clear(a Attribute)
- func (o *Object) DN() string
- func (o *Object) EdgeClear(target *Object, edge Edge)
- func (o *Object) EdgeIteratorRecursive(direction EdgeDirection, edgeMatch EdgeBitmap, excludemyself bool, ...)
- func (o *Object) EdgeTo(target *Object, edge Edge)
- func (o *Object) EdgeToEx(target *Object, edge Edge, force bool)
- func (o *Object) Edges(direction EdgeDirection) *EdgeConnectionsPlus
- func (o *Object) Get(attr Attribute) (AttributeValues, bool)
- func (o *Object) HasAttr(attr Attribute) bool
- func (o *Object) HasAttrValue(attr Attribute, hasvalue AttributeValue) bool
- func (o *Object) HasTag(v string) bool
- func (o *Object) ID() ObjectID
- func (o *Object) IDString() string
- func (o *Object) IsValid() bool
- func (o *Object) Label() string
- func (o *Object) MarshalJSON() ([]byte, error)
- func (o *Object) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (o *Object) Meta() map[string]string
- func (o *Object) NameStringMap() StringMap
- func (o *Object) ObjectCategoryGUID(ao *Objects) uuid.UUID
- func (o *Object) OneAttr(attr Attribute) AttributeValue
- func (o *Object) OneAttrRaw(attr Attribute) any
- func (o *Object) OneAttrRendered(attr Attribute) string
- func (o *Object) OneAttrString(attr Attribute) string
- func (o *Object) Parent() *Object
- func (o *Object) PrimaryID() (Attribute, AttributeValue)
- func (o *Object) SID() windowssecurity.SID
- func (o *Object) SecurityDescriptor() (*SecurityDescriptor, error)
- func (o *Object) Set(a Attribute, values ...AttributeValue)
- func (o *Object) SetFlex(flexinit ...any)
- func (o *Object) String() string
- func (o *Object) StringACL(ao *Objects) string
- func (o *Object) Tag(v string)
- func (o *Object) Type() ObjectType
- func (o *Object) ValueMap() map[string][]string
- type ObjectEdge
- type ObjectID
- type ObjectSlice
- func (os *ObjectSlice) Add(o *Object)
- func (os ObjectSlice) First() *Object
- func (os ObjectSlice) Iterate(af func(o *Object) bool)
- func (os ObjectSlice) Len() int
- func (os *ObjectSlice) Limit(count int)
- func (os *ObjectSlice) Remove(o *Object)
- func (os *ObjectSlice) Skip(count int)
- func (os *ObjectSlice) Sort(attr Attribute, reverse bool)
- func (os *ObjectSlice) SortFunc(lessthan func(o, o2 *Object) bool)
- type ObjectType
- type Objects
- func (os *Objects) Add(obs ...*Object)
- func (os *Objects) AddDefaultFlex(data ...any)
- func (os *Objects) AddMerge(attrtomerge []Attribute, obs ...*Object)
- func (os *Objects) AddNew(flexinit ...any) *Object
- func (os *Objects) AddRelaxed(o *Object)
- func (os *Objects) AsSlice() ObjectSlice
- func (os *Objects) Contains(o *Object) bool
- func (os *Objects) DistinguishedParent(o *Object) (*Object, bool)
- func (os *Objects) DropIndex(attribute Attribute)
- func (os *Objects) DropIndexes()
- func (os *Objects) Filter(evaluate func(o *Object) bool) *Objects
- func (os *Objects) Find(attribute Attribute, value AttributeValue) (o *Object, found bool)
- func (os *Objects) FindGUID(g uuid.UUID) (o *Object, found bool)
- func (os *Objects) FindID(id ObjectID) (*Object, bool)
- func (os *Objects) FindMulti(attribute Attribute, value AttributeValue) (ObjectSlice, bool)
- func (os *Objects) FindMultiOrAdd(attribute Attribute, value AttributeValue, addifnotfound func() *Object) (ObjectSlice, bool)
- func (os *Objects) FindOrAdd(attribute Attribute, value AttributeValue, flexinit ...any) (*Object, bool)
- func (os *Objects) FindOrAddAdjacentSID(s windowssecurity.SID, r *Object, flexinit ...any) *Object
- func (os *Objects) FindOrAddAdjacentSIDFound(s windowssecurity.SID, r *Object, flexinit ...any) (*Object, bool)
- func (os *Objects) FindOrAddObject(o *Object) bool
- func (os *Objects) FindOrAddSID(s windowssecurity.SID) *Object
- func (os *Objects) FindTwo(attribute Attribute, value AttributeValue, attribute2 Attribute, ...) (o *Object, found bool)
- func (os *Objects) FindTwoMulti(attribute Attribute, value AttributeValue, attribute2 Attribute, ...) (o ObjectSlice, found bool)
- func (os *Objects) FindTwoMultiOrAdd(attribute Attribute, value AttributeValue, attribute2 Attribute, ...) (ObjectSlice, bool)
- func (os *Objects) FindTwoOrAdd(attribute Attribute, value AttributeValue, attribute2 Attribute, ...) (o *Object, found bool)
- func (os *Objects) GetIndex(attribute Attribute) *Index
- func (os *Objects) GetMultiIndex(attribute, attribute2 Attribute) *MultiIndex
- func (os *Objects) Iterate(each func(o *Object) bool)
- func (os *Objects) IterateID(each func(id ObjectID) bool)
- func (os *Objects) IterateParallel(each func(o *Object) bool, parallelFuncs int)
- func (os *Objects) Len() int
- func (os *Objects) Merge(attrtomerge []Attribute, source *Object) bool
- func (os *Objects) MergeOrAdd(attribute Attribute, value AttributeValue, flexinit ...any) (*Object, bool)
- func (os *Objects) ReindexObject(o *Object, isnew bool)
- func (os *Objects) Root() *Object
- func (os *Objects) SetRoot(ro *Object)
- func (os *Objects) Statistics() typestatistics
- func (os *Objects) Subordinates(o *Object) *Objects
- type Probability
- type ProbabilityCalculatorFunction
- type ProcessPriority
- type ProcessorFunc
- type ProgressCallbackFunc
- type SecurityDescriptor
- type SecurityDescriptorControlFlag
- type StartLength
- type StringMap
Constants ¶
const ( UAC_SCRIPT = 0x0001 UAC_ACCOUNTDISABLE = 0x0002 UAC_HOMEDIR_REQUIRED = 0x0008 UAC_LOCKOUT = 0x0010 UAC_PASSWD_NOTREQD = 0x0020 UAC_PASSWD_CANT_CHANGE = 0x0040 UAC_ENCRYPTED_TEXT_PWD_ALLOWED = 0x0080 UAC_TEMP_DUPLICATE_ACCOUNT = 0x0100 UAC_NORMAL_ACCOUNT = 0x0200 UAC_INTERDOMAIN_TRUST_ACCOUNT = 0x0800 UAC_WORKSTATION_TRUST_ACCOUNT = 0x1000 UAC_SERVER_TRUST_ACCOUNT = 0x2000 UAC_DONT_EXPIRE_PASSWORD = 0x10000 UAC_MNS_LOGON_ACCOUNT = 0x20000 UAC_SMARTCARD_REQUIRED = 0x40000 UAC_TRUSTED_FOR_DELEGATION = 0x80000 UAC_NOT_DELEGATED = 0x100000 UAC_USE_DES_KEY_ONLY = 0x200000 UAC_DONT_REQ_PREAUTH = 0x400000 UAC_PASSWORD_EXPIRED = 0x800000 UAC_TRUSTED_TO_AUTH_FOR_DELEGATION = 0x1000000 UAC_PARTIAL_SECRETS_ACCOUNT = 0x04000000 RIGHT_GENERIC_READ Mask = RIGHT_READ_CONTROL | RIGHT_DS_LIST_CONTENTS | RIGHT_DS_READ_PROPERTY | RIGHT_DS_LIST_OBJECT /* ** Mask value is not stored in AD but deduced from mask bits combined ** RIGHT_GENERIC_READ = 0x80000000 /* The right to read permissions and all properties of the object, and list the contents of the object in the case of containers. Equivalent to:RIGHT_READ_CONTROL | RIGHT_DS_LIST_CONTENTS | RIGHT_DS_READ_PROPERTY | RIGHT_DS_LIST_OBJECT */ RIGHT_GENERIC_WRITE = RIGHT_READ_CONTROL | RIGHT_DS_WRITE_PROPERTY | RIGHT_DS_WRITE_PROPERTY_EXTENDED /* ** Mask value is not stored in AD but deduced from mask bits combined ** RIGHT_GENERIC_WRITE = 0x40000000 /* Includes the right to read permissions on the object, and the right to write all the properties on the object. Equivalent to: RIGHT_READ_CONTROL | RIGHT_DS_WRITE_PROPERTY | RIGHT_DS_WRITE_PROPERTY_EXTENDED */ RIGHT_GENERIC_EXECUTE = RIGHT_READ_CONTROL | RIGHT_DS_LIST_CONTENTS /* ** Mask value is not stored in AD but deduced from mask bits combined ** RIGHT_GENERIC_EXECUTE = 0x20000000 /* The right to read permissions/list the contents of a container object. Equivalent to: RIGHT_READ_CONTROL | RIGHT_DS_LIST_CONTENTS */ RIGHT_GENERIC_ALL = RIGHT_DELETE | RIGHT_READ_CONTROL | RIGHT_WRITE_DACL | RIGHT_WRITE_OWNER | RIGHT_DS_CREATE_CHILD | RIGHT_DS_DELETE_CHILD | RIGHT_DS_DELETE_TREE | RIGHT_DS_READ_PROPERTY | RIGHT_DS_WRITE_PROPERTY | RIGHT_DS_LIST_CONTENTS | RIGHT_DS_LIST_OBJECT | RIGHT_DS_CONTROL_ACCESS | RIGHT_DS_WRITE_PROPERTY_EXTENDED /* ** Mask value is not stored in AD but deduced from mask bits combined ** RIGHT_GENERIC_ALL = 0x10000000 /* The right to create/delete child objects, read/write all properties, see any child objects, add and remove the object, and read/write with an extended right. Equivalent to: RIGHT_DELETE | RIGHT_READ_CONTROL | RIGHT_WRITE_DACL | RIGHT_WRITE_OWNER | RIGHT_DS_CREATE_CHILD | RIGHT_DS_DELETE_CHILD | RIGHT_DS_DELETE_TREE | RIGHT_DS_READ_PROPERTY | RIGHT_DS_WRITE_PROPERTY | RIGHT_DS_LIST_CONTENTS | RIGHT_DS_LIST_OBJECT | RIGHT_DS_CONTROL_ACCESS | RIGHT_DS_WRITE_PROPERTY_EXTENDED) */ RIGHT_SYNCRONIZE = 0x00100000 RIGHT_WRITE_OWNER = 0x00080000 /* The right to modify the owner section of the security descriptor. Of note, a user with this right can only change the owner to themselves -ownership cannot be transferred to other userswith only this right.*/ RIGHT_WRITE_DACL = 0x00040000 /* The right to modify the DACL for the object. */ RIGHT_READ_CONTROL = 0x00020000 /* The right to read alldata from the security descriptor except the SACL. */ RIGHT_DELETE = 0x00010000 /* The right to delete the object. */ RIGHT_DS_VOODOO_BIT = 0x00001000 /* No clue - see https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-crtd/4be42fa6-c421-4763-890b-07a9ab5a319d for second option */ RIGHT_DS_CONTROL_ACCESS = 0x00000100 /* A specific control access right (if the ObjectType GUID refers to an extended right registered in the forest schema) or the right to read a confidential property (if the ObjectType GUID refers to a confidential property). If the GUID is not present, then all extended rights are granted */ RIGHT_DS_LIST_OBJECT = 0x00000080 /* The right to list an object. If the user does not have this right and also doesn’t have the RIGHT_DS_LIST_CONTENTS right on the object's parent container then the object is hidden from the user. */ RIGHT_DS_DELETE_TREE = 0x00000040 /* The right to perform a delete-tree operation. */ RIGHT_DS_WRITE_PROPERTY = 0x00000020 /* The right to write one or more properties of the object specified by the ObjectType GUID. If the ObjectType GUID is not present or is all 0s, then the right to write all properties is granted. */ RIGHT_DS_READ_PROPERTY = 0x00000010 /* The right to read one or more properties of the object specified by the ObjectType GUID. If the ObjectType GUID is not present or is all 0s, then the right to read all properties is granted. */ RIGHT_DS_WRITE_PROPERTY_EXTENDED = 0x00000008 /* The right to execute a validated write access right. AKA DsSelf */ RIGHT_DS_LIST_CONTENTS = 0x00000004 /* The right to list all child objects of the object, if the object is a type of container. */ RIGHT_DS_DELETE_CHILD = 0x00000002 /* The right to delete child objects of the object, if the object is a type of container. If the ObjectType contains a GUID, the GUID will reference the type of child object that can be deleted. */ RIGHT_DS_CREATE_CHILD = 0x00000001 /* The right to create child objects under the object, if the object is a type of container. If the ObjectType contains a GUID, the GUID will reference the type of child object that can be created. */ )
const ( CONTROLFLAG_OWNER_DEFAULTED SecurityDescriptorControlFlag = 0x0001 CONTROLFLAG_GROUP_DEFAULTED SecurityDescriptorControlFlag = 0x0002 CONTROLFLAG_DACL_PRESENT SecurityDescriptorControlFlag = 0x0004 CONTROLFLAG_DACL_DEFAULTED SecurityDescriptorControlFlag = 0x0008 CONTROLFLAG_SACL_PRESENT SecurityDescriptorControlFlag = 0x0010 CONTROLFLAG_SACL_DEFAULTED SecurityDescriptorControlFlag = 0x0020 CONTROLFLAG_DACL_AUTO_INHERITED SecurityDescriptorControlFlag = 0x0400 CONTROLFLAG_SACL_AUTO_INHERITED SecurityDescriptorControlFlag = 0x0800 CONTROLFLAG_DACL_PROTECTED SecurityDescriptorControlFlag = 0x1000 CONTROLFLAG_SACL_PROTECTED SecurityDescriptorControlFlag = 0x2000 CONTROLFLAG_SELF_RELATIVE SecurityDescriptorControlFlag = 0x8000 // ACE.Type ACETYPE_ACCESS_ALLOWED ACEType = 0x00 ACETYPE_ACCESS_DENIED ACEType = 0x01 ACETYPE_ACCESS_ALLOWED_OBJECT ACEType = 0x05 ACETYPE_ACCESS_DENIED_OBJECT ACEType = 0x06 // ACE.ACEFlags ACEFLAG_OBJECT_INHERIT_ACE ACEFlags = 0x01 // Noncontainer child objects inherit the ACE as an effective ACE. For child objects that are containers, the ACE is inherited as an inherit-only ACE unless the NO_PROPAGATE_INHERIT_ACE bit flag is also set ACEFLAG_INHERIT_ACE ACEFlags = 0x02 // Child objects that are containers, such as directories, inherit the ACE as an effective ACE. The inherited ACE is inheritable unless the NO_PROPAGATE_INHERIT_ACE bit flag is also set. ACEFLAG_NO_PROPAGATE_INHERIT_ACE ACEFlags = 0x04 // If the ACE is inherited by a child object, the system clears the OBJECT_INHERIT_ACE and CONTAINER_INHERIT_ACE flags in the inherited ACE. This prevents the ACE from being inherited by subsequent generations of objects. ACEFLAG_INHERIT_ONLY_ACE ACEFlags = 0x08 // Indicates an inherit-only ACE, which does not control access to the object to which it is attached. If this flag is not set, the ACE is an effective ACE that controls access to the object to which it is attached. Both effective and inherit-only ACEs can be inherited depending on the state of the other inheritance flags. ACEFLAG_INHERITED_ACE ACEFlags = 0x10 // Indicates that the ACE was inherited. The system sets this bit when it propagates an inherited ACE to a child object ACEFLAG_UNKNOWN ACEFlags = 0x20 // Unknown ACEFLAG_AUDIT_SUCCESS_ACCESS ACEFlags = 0x40 // Audit successfull access ACEFLAG_AUDIT_FAILED_ACCESS ACEFlags = 0x80 // Audit failed access // ACE.Flags - present if this is a ACETYPE_ACCESS_*_OBJECT Type OBJECT_TYPE_PRESENT Flags = 0x01 INHERITED_OBJECT_TYPE_PRESENT Flags = 0x02 RIGHT_MAXIMUM_ALLOWED = 0x02000000 /* Not stored in AD, just for requests */ RIGHT_ACCESS_SYSTEM_SECURITY = 0x01000000 /* Not stored in AD, just for requests */ // REGISTRY PERMISSIONS MASK KEY_ALL_ACCESS = 0xF003F KEY_READ = 0x20019 KEY_WRITE = 0x20006 KEY_EXECUTE = 0x20019 KEY_CREATE_SUB_KEYS = 0x0004 KEY_ENUMERATE_SUB_KEYS = 0x0008 KEY_NOTIFY = 0x0010 KEY_QUERY_VALUE = 0x0001 KEY_SET_VALUE = 0x0002 FILE_READ_DATA = 0x00000001 // Grants the right to read data from the file. FILE_LIST_DIRECTORY = 0x00000001 // Grants the right to read data from the file. For a directory, this value grants the right to list the contents of the directory. FILE_WRITE_DATA = 0x00000002 // Grants the right to write data to the file. FILE_ADD_FILE = 0x00000002 // Grants the right to write data to the file. For a directory, this value grants the right to create a file in the directory. FILE_APPEND_DATA = 0x00000004 // Grants the right to append data to the file. For a directory, this value grants the right to create a subdirectory. FILE_ADD_SUBDIRECTORY = 0x00000004 // Grants the right to append data to the file. For a directory, this value grants the right to create a subdirectory. FILE_READ_EA = 0x00000008 // Grants the right to read extended attributes. FILE_WRITE_EA = 0x00000010 // Grants the right to write extended attributes. FILE_EXECUTE = 0x00000020 // Grants the right to execute a file. FILE_TRAVERSE = 0x00000020 // Grants the right to execute a file. For a directory, the directory can be traversed. FILE_DELETE_CHILD = 0x00000040 // Grants the right to delete a directory and all the files it contains (its children), even if the files are read-only. FILE_READ_ATTRIBUTES = 0x00000080 // Grants the right to read file attributes. FILE_WRITE_ATTRIBUTES = 0x00000100 // Grants the right to change file attributes. DELETE = 0x00010000 // Grants the right to delete the object. READ_CONTROL = 0x00020000 // Grants the right to read the information in the security descriptor for the object, not including the information in the SACL. WRITE_DAC = 0x00040000 // Grants the right to modify the DACL in the object security descriptor for the object. WRITE_OWNER = 0x00080000 // Grants the right to change the owner in the security descriptor for the object. SYNCHRONIZE = 0x00100000 )
const MAXEDGEPOSSIBLE = PMBSIZE * 64
const PMBSIZE = 3
Increas this when we run out of space
Variables ¶
var ( NonExistingAttribute = ^Attribute(0) DistinguishedName = NewAttribute("distinguishedName").Single().Unique() ObjectClass = NewAttribute("objectClass") ObjectCategory = NewAttribute("objectCategory").Single() Type = NewAttribute("type").Single() Name = NewAttribute("name").Single() DisplayName = NewAttribute("displayName").Single() LDAPDisplayName = NewAttribute("lDAPDisplayName").Single() Description = NewAttribute("description") SAMAccountName = NewAttribute("sAMAccountName").Single() ObjectSid = NewAttribute("objectSid").Single() // Single, but not unique! Strange yes, but in the final results there are multiple objects with the same SID ObjectGUID = NewAttribute("objectGUID").Single().Merge().Unique() NTSecurityDescriptor = NewAttribute("nTSecurityDescriptor").Single() SchemaIDGUID = NewAttribute("schemaIDGUID") RightsGUID = NewAttribute("rightsGUID") AttributeSecurityGUID = NewAttribute("attributeSecurityGUID") WhenChanged = NewAttribute("whenChanged").Type(AttributeTypeTime) // Not replicated, so we're not marking it as "single" WhenCreated = NewAttribute("whenCreated").Single().Type(AttributeTypeTime) ObjectClassGUIDs = NewAttribute("objectClassGUID") // Used for caching the GUIDs, should belong in AD analyzer, but it's used in the SecurityDescritor mapping, so we're cheating a bit ObjectCategoryGUID = NewAttribute("objectCategoryGUID") // Used for caching the GUIDs IsCriticalSystemObject = NewAttribute("isCriticalSystemObject") DataLoader = NewAttribute("dataLoader").SetDescription("Where did data in this object come from") DataSource = NewAttribute("dataSource").SetDescription("Data from different sources are never merged together") IPAddress = NewAttribute("iPAddress") DownLevelLogonName = NewAttribute("downLevelLogonName").Merge() UserPrincipalName = NewAttribute("userPrincipalName").Merge() NetbiosDomain = NewAttribute("netbiosDomain").Single() // Used to merge users with - if we only have a DOMAIN\USER type of info DomainContext = NewAttribute("domainContext").Single() Tag = NewAttribute("tag") )
var ( ErrTooManyEdges = errors.New("too many edges in string slice") ErrEdgeNotFound = errors.New("edge not found") )
var ( NonExistingEdge = Edge(10000) AnyEdgeType = Edge(9999) )
var ( NonExistingObjectType = ^ObjectType(0) ObjectTypeOther = NewObjectType("Other", "") ObjectTypeCallableServicePoint = NewObjectType("CallableService", "Callable-Service-Point") ObjectTypeDomainDNS = NewObjectType("DomainDNS", "Domain-DNS") ObjectTypeDNSNode = NewObjectType("DNSNode", "Dns-Node") //.SetDefault(Last, false) ObjectTypeDNSZone = NewObjectType("DNSZone", "Dns-Zone") //.SetDefault(Last, false) ObjectTypeUser = NewObjectType("User", "Person") ObjectTypeGroup = NewObjectType("Group", "Group") ObjectTypeGroupManagedServiceAccount = NewObjectType("GroupManagedServiceAccount", "ms-DS-Group-Managed-Service-Account") ObjectTypeManagedServiceAccount = NewObjectType("ManagedServiceAccount", "ms-DS-Managed-Service-Account") ObjectTypeOrganizationalUnit = NewObjectType("OrganizationalUnit", "Organizational-Unit") //.SetDefault(Last, false) ObjectTypeBuiltinDomain = NewObjectType("BuiltinDomain", "Builtin-Domain") ObjectTypeContainer = NewObjectType("Container", "Container") //.SetDefault(Last, false) ObjectTypeComputer = NewObjectType("Computer", "Computer") ObjectTypeMachine = NewObjectType("Machine", "Machine") ObjectTypeGroupPolicyContainer = NewObjectType("GroupPolicyContainer", "Group-Policy-Container") ObjectTypeTrust = NewObjectType("Trust", "Trusted-Domain") ObjectTypeAttributeSchema = NewObjectType("AttributeSchema", "Attribute-Schema") ObjectTypeClassSchema = NewObjectType("ClassSchema", "Class-Schema") ObjectTypeControlAccessRight = NewObjectType("ControlAccessRight", "Control-Access-Right") ObjectTypeCertificateTemplate = NewObjectType("CertificateTemplate", "PKI-Certificate-Template") ObjectTypePKIEnrollmentService = NewObjectType("PKIEnrollmentService", "PKI-Enrollment-Service") ObjectTypeCertificationAuthority = NewObjectType("CertificationAuthority", "Certification-Authority") ObjectTypeForeignSecurityPrincipal = NewObjectType("ForeignSecurityPrincipal", "Foreign-Security-Principal") ObjectTypeService = NewObjectType("Service", "Service") //.SetDefault(Last, false) ObjectTypeExecutable = NewObjectType("Executable", "Executable") //.SetDefault(Last, false) ObjectTypeDirectory = NewObjectType("Directory", "Directory") //.SetDefault(Last, false) ObjectTypeFile = NewObjectType("File", "File") //.SetDefault(Last, false) )
var EdgePopularity [MAXEDGEPOSSIBLE]uint64
var ErrDontMerge = errors.New("Dont merge objects using any methods")
var ErrEmptySecurityDescriptorAttribute = errors.New("empty nTSecurityDescriptor attribute!?")
var ErrMergeOnThis = errors.New("Merge on this attribute")
var ErrNoSecurityDescriptor = errors.New("no security desciptor")
var (
ErrUninterested = errors.New("plugin is not interested in this file, try harder")
)
var ExtendedRightCertificateAutoEnroll, _ = uuid.FromString("a05b8cc2-17bc-4802-a710-e7c15ab866a2")
var ExtendedRightCertificateEnroll, _ = uuid.FromString("0e10c968-78fb-11d2-90d4-00c04f79dc55")
var IgnoreBlanks = "_IGNOREBLANKS_"
var RememberedObjects, NukedObjects uint64
var UnknownGUID = uuid.UUID{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}
Functions ¶
func AddMergeApprover ¶
func AddMergeApprover(name string, mf mergefunc)
AddMergeApprover adds a new function that can object to an object merge, or forever hold its silence
func AttributeInfos ¶
func AttributeInfos() []attributeinfo
func CompareAttributeValues ¶
func CompareAttributeValues(a, b AttributeValue) bool
func CompareAttributeValuesInt ¶
func CompareAttributeValuesInt(a, b AttributeValue) int
func EdgeDirectionStrings ¶
func EdgeDirectionStrings() []string
EdgeDirectionStrings returns a slice of all String values of the enum
func Load ¶
func Load(loaders []Loader, path string, cb ProgressCallbackFunc) ([]loaderobjects, error)
Load runs all registered loaders
func ObjectTypes ¶
func ObjectTypes() []objecttypeinfo
func PostProcess ¶
func PostProcess(ao *Objects)
func Process ¶
func Process(ao *Objects, statustext string, l LoaderID, priority ProcessPriority) error
LoaderID = wildcard
func ProcessPriorityStrings ¶
func ProcessPriorityStrings() []string
ProcessPriorityStrings returns a slice of all String values of the enum
Types ¶
type ACE ¶
type ACE struct { SID windowssecurity.SID Type ACEType Flags Flags ACEFlags ACEFlags Mask Mask ObjectType uuid.UUID InheritedObjectType uuid.UUID }
func (ACE) StringNoLookup ¶
type ACL ¶
type ACL struct { Entries []ACE Revision byte HadSortingProblem bool // contains filtered or unexported fields }
func (ACL) IsObjectClassAccessAllowed ¶
func (*ACL) IsSortedCorrectly ¶
func (ACL) StringNoLookup ¶
type Attribute ¶
type Attribute uint16
func Attributes ¶
func Attributes() []Attribute
func LookupAttribute ¶
func NewAttribute ¶
func (Attribute) IsNonUnique ¶
func (Attribute) OnGet ¶
func (a Attribute) OnGet(onget AttributeGetFunc) Attribute
func (Attribute) OnSet ¶
func (a Attribute) OnSet(onset AttributeSetFunc) Attribute
func (Attribute) SetDescription ¶
func (Attribute) Type ¶
func (a Attribute) Type(t AttributeType) Attribute
type AttributeAndValues ¶
type AttributeAndValues struct {
// contains filtered or unexported fields
}
type AttributeGetFunc ¶
type AttributeGetFunc func(o *Object, a Attribute) (v AttributeValues, found bool)
type AttributePair ¶
type AttributePair struct {
// contains filtered or unexported fields
}
type AttributeSetFunc ¶
type AttributeSetFunc func(o *Object, a Attribute, v AttributeValues) error
type AttributeType ¶
type AttributeType uint8
const ( AttributeTypeUnknown AttributeType = iota AttributeTypeString AttributeTypeInt AttributeTypeFloat AttributeTypeBool AttributeTypeTime AttributeTypeTime100NS AttributeTypeSID AttributeTypeGUID AttributeTypeBlob AttributeTypeSecurityDescriptor )
type AttributeValue ¶
type AttributeValue interface { String() string Raw() any IsZero() bool Compare(AttributeValue) int }
func AttributeValueToIndex ¶
func AttributeValueToIndex(value AttributeValue) AttributeValue
type AttributeValueBool ¶
type AttributeValueBool bool
func (AttributeValueBool) Compare ¶
func (ab AttributeValueBool) Compare(c AttributeValue) int
func (AttributeValueBool) IsZero ¶
func (ab AttributeValueBool) IsZero() bool
func (AttributeValueBool) Raw ¶
func (ab AttributeValueBool) Raw() any
func (AttributeValueBool) String ¶
func (ab AttributeValueBool) String() string
type AttributeValueGUID ¶
func NewAttributeValueGUID ¶
func NewAttributeValueGUID(u uuid.UUID) AttributeValueGUID
func (AttributeValueGUID) Compare ¶
func (ab AttributeValueGUID) Compare(c AttributeValue) int
func (AttributeValueGUID) IsZero ¶
func (as AttributeValueGUID) IsZero() bool
func (AttributeValueGUID) Raw ¶
func (as AttributeValueGUID) Raw() any
func (AttributeValueGUID) String ¶
func (as AttributeValueGUID) String() string
type AttributeValueInt ¶
type AttributeValueInt int64
func (AttributeValueInt) Compare ¶
func (ab AttributeValueInt) Compare(c AttributeValue) int
func (AttributeValueInt) IsZero ¶
func (as AttributeValueInt) IsZero() bool
func (AttributeValueInt) Raw ¶
func (as AttributeValueInt) Raw() any
func (AttributeValueInt) String ¶
func (as AttributeValueInt) String() string
type AttributeValueObject ¶
type AttributeValueObject struct {
*Object
}
func (AttributeValueObject) Compare ¶
func (ab AttributeValueObject) Compare(c AttributeValue) int
func (AttributeValueObject) IsZero ¶
func (avo AttributeValueObject) IsZero() bool
func (AttributeValueObject) Raw ¶
func (avo AttributeValueObject) Raw() any
func (AttributeValueObject) String ¶
func (avo AttributeValueObject) String() string
type AttributeValuePair ¶
type AttributeValuePair struct { Value1 AttributeValue Value2 AttributeValue }
type AttributeValueSID ¶
type AttributeValueSID unique.Handle[windowssecurity.SID]
func NewAttributeValueSID ¶
func NewAttributeValueSID(s windowssecurity.SID) AttributeValueSID
func (AttributeValueSID) Compare ¶
func (ab AttributeValueSID) Compare(c AttributeValue) int
func (AttributeValueSID) IsZero ¶
func (as AttributeValueSID) IsZero() bool
func (AttributeValueSID) Raw ¶
func (as AttributeValueSID) Raw() any
func (AttributeValueSID) String ¶
func (as AttributeValueSID) String() string
type AttributeValueSecurityDescriptor ¶
type AttributeValueSecurityDescriptor struct {
SD *SecurityDescriptor
}
func (AttributeValueSecurityDescriptor) Compare ¶
func (ab AttributeValueSecurityDescriptor) Compare(c AttributeValue) int
func (AttributeValueSecurityDescriptor) IsZero ¶
func (as AttributeValueSecurityDescriptor) IsZero() bool
func (AttributeValueSecurityDescriptor) Raw ¶
func (as AttributeValueSecurityDescriptor) Raw() any
func (AttributeValueSecurityDescriptor) String ¶
func (as AttributeValueSecurityDescriptor) String() string
type AttributeValueString ¶
func NewAttributeValueString ¶
func NewAttributeValueString(s string) AttributeValueString
func (AttributeValueString) Compare ¶
func (as AttributeValueString) Compare(c AttributeValue) int
func (AttributeValueString) IsZero ¶
func (as AttributeValueString) IsZero() bool
func (AttributeValueString) Raw ¶
func (as AttributeValueString) Raw() any
func (AttributeValueString) String ¶
func (as AttributeValueString) String() string
type AttributeValueTime ¶
func (AttributeValueTime) Compare ¶
func (ab AttributeValueTime) Compare(c AttributeValue) int
func (AttributeValueTime) IsZero ¶
func (as AttributeValueTime) IsZero() bool
func (AttributeValueTime) Raw ¶
func (as AttributeValueTime) Raw() any
func (AttributeValueTime) String ¶
func (as AttributeValueTime) String() string
type AttributeValues ¶
type AttributeValues []AttributeValue
AttributeValues can contain one or more values
func MergeValues ¶
func MergeValues(v1, v2 AttributeValues) AttributeValues
func (AttributeValues) First ¶
func (avs AttributeValues) First() AttributeValue
func (AttributeValues) Iterate ¶
func (avs AttributeValues) Iterate(it func(val AttributeValue) bool)
func (AttributeValues) Len ¶
func (avs AttributeValues) Len() int
func (AttributeValues) Sort ¶
func (avs AttributeValues) Sort()
func (AttributeValues) StringSlice ¶
func (avs AttributeValues) StringSlice() []string
type AttributesAndValues ¶
type AttributesAndValues struct {
// contains filtered or unexported fields
}
func (*AttributesAndValues) Clear ¶
func (avm *AttributesAndValues) Clear(a Attribute)
func (*AttributesAndValues) Get ¶
func (avm *AttributesAndValues) Get(a Attribute) (av AttributeValues, found bool)
func (*AttributesAndValues) Iterate ¶
func (avm *AttributesAndValues) Iterate(f func(attr Attribute, values AttributeValues) bool)
func (*AttributesAndValues) Len ¶
func (avm *AttributesAndValues) Len() int
func (*AttributesAndValues) Merge ¶
func (avm *AttributesAndValues) Merge(avm2 *AttributesAndValues) *AttributesAndValues
func (*AttributesAndValues) Set ¶
func (avm *AttributesAndValues) Set(a Attribute, av AttributeValues)
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func (Connection) Compare ¶
func (c Connection) Compare(c2 Connection) int
func (Connection) LessThan ¶
func (c Connection) LessThan(c2 Connection) bool
type Edge ¶
type Edge int
func LookupEdge ¶
func (Edge) Probability ¶
func (pm Edge) Probability(source, target *Object, edges *EdgeBitmap) Probability
func (Edge) RegisterProbabilityCalculator ¶
func (pm Edge) RegisterProbabilityCalculator(doCalc ProbabilityCalculatorFunction) Edge
func (Edge) SetDefault ¶
type EdgeAnalyzer ¶
EdgeAnalyzer takes an Object, examines it an outputs a list of Objects that can Pwn it
type EdgeBitmap ¶
var AllEdgesBitmap EdgeBitmap
func EdgeBitmapFromStringSlice ¶
func EdgeBitmapFromStringSlice(edgenames []string) (eb EdgeBitmap, err error)
func (*EdgeBitmap) AtomicAnd ¶
func (eb *EdgeBitmap) AtomicAnd(edges EdgeBitmap)
func (*EdgeBitmap) AtomicClear ¶
func (eb *EdgeBitmap) AtomicClear(edge Edge)
func (*EdgeBitmap) AtomicOr ¶
func (eb *EdgeBitmap) AtomicOr(edges EdgeBitmap)
func (*EdgeBitmap) AtomicSet ¶
func (eb *EdgeBitmap) AtomicSet(edge Edge)
func (EdgeBitmap) Clear ¶
func (eb EdgeBitmap) Clear(edge Edge) EdgeBitmap
func (EdgeBitmap) Count ¶
func (eb EdgeBitmap) Count() int
func (EdgeBitmap) Edges ¶
func (eb EdgeBitmap) Edges() []Edge
func (EdgeBitmap) Intersect ¶
func (eb EdgeBitmap) Intersect(edges EdgeBitmap) EdgeBitmap
func (EdgeBitmap) Invert ¶
func (eb EdgeBitmap) Invert() EdgeBitmap
func (EdgeBitmap) IsBlank ¶
func (eb EdgeBitmap) IsBlank() bool
func (*EdgeBitmap) IsSet ¶
func (m *EdgeBitmap) IsSet(edge Edge) bool
func (EdgeBitmap) JoinedString ¶
func (m EdgeBitmap) JoinedString() string
func (*EdgeBitmap) MaxProbability ¶
func (m *EdgeBitmap) MaxProbability(source, target *Object) Probability
func (EdgeBitmap) Merge ¶
func (eb EdgeBitmap) Merge(edges EdgeBitmap) EdgeBitmap
func (*EdgeBitmap) PartialAtomicLoad ¶
func (eb *EdgeBitmap) PartialAtomicLoad() (edges EdgeBitmap)
func (EdgeBitmap) Set ¶
func (eb EdgeBitmap) Set(edge Edge) EdgeBitmap
func (EdgeBitmap) StringSlice ¶
func (m EdgeBitmap) StringSlice() []string
func (EdgeBitmap) ToStringSlice ¶
func (eb EdgeBitmap) ToStringSlice() []string
type EdgeConnections ¶
type EdgeConnections struct {
// contains filtered or unexported fields
}
func (*EdgeConnections) Len ¶
func (ec *EdgeConnections) Len() int
func (*EdgeConnections) Objects ¶
func (ec *EdgeConnections) Objects() ObjectSlice
func (*EdgeConnections) Range ¶
func (ec *EdgeConnections) Range(rf func(*Object, EdgeBitmap) bool)
Thread safe range
func (*EdgeConnections) RangeID ¶
func (ec *EdgeConnections) RangeID(rf func(ObjectID, EdgeBitmap) bool)
func (*EdgeConnections) StringMap ¶
func (ec *EdgeConnections) StringMap() map[string]string
type EdgeConnectionsPlus ¶
type EdgeConnectionsPlus struct { gonk.Gonk[Connection] }
func (*EdgeConnectionsPlus) Range ¶
func (ecp *EdgeConnectionsPlus) Range(rf func(o *Object, eb EdgeBitmap) bool)
type EdgeDirection ¶
type EdgeDirection int
const ( Out EdgeDirection = 0 In EdgeDirection = 1 Any EdgeDirection = 9 )
func EdgeDirectionString ¶
func EdgeDirectionString(s string) (EdgeDirection, error)
EdgeDirectionString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func EdgeDirectionValues ¶
func EdgeDirectionValues() []EdgeDirection
EdgeDirectionValues returns all values of the enum
func (EdgeDirection) IsAEdgeDirection ¶
func (i EdgeDirection) IsAEdgeDirection() bool
IsAEdgeDirection returns "true" if the value is listed in the enum definition. "false" otherwise
func (EdgeDirection) MarshalJSON ¶
func (i EdgeDirection) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface for EdgeDirection
func (EdgeDirection) String ¶
func (i EdgeDirection) String() string
func (*EdgeDirection) UnmarshalJSON ¶
func (i *EdgeDirection) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for EdgeDirection
type Index ¶
func (*Index) Iterate ¶
func (i *Index) Iterate(each func(key AttributeValue, objects ObjectSlice) bool)
func (*Index) Lookup ¶
func (i *Index) Lookup(key AttributeValue) (ObjectSlice, bool)
type Loader ¶
type Loader interface { Name() string // Init is called before any loads are done Init() error // Load will be offered a file, and can either return UnininterestedError, nil or any error it // wishes. UninterestedError will pass the file to the next loader, Nil means it accepted and processed the file, // and any other error will stop processing the file and display an error Load(path string, cb ProgressCallbackFunc) error // Close signals that no more files are coming Close() ([]*Objects, error) }
type LoaderEstimator ¶
type LoaderEstimator interface {
Estimate(path string, cb ProgressCallbackFunc) error
}
type LoaderGenerator ¶
type LoaderGenerator func() Loader
type LoaderID ¶
type LoaderID int
func AddLoader ¶
func AddLoader(lg LoaderGenerator) LoaderID
func (LoaderID) AddProcessor ¶
func (l LoaderID) AddProcessor(pf ProcessorFunc, description string, priority ProcessPriority)
type MultiIndex ¶
func (*MultiIndex) Add ¶
func (i *MultiIndex) Add(key, key2 AttributeValue, o *Object, undupe bool)
func (*MultiIndex) Iterate ¶
func (i *MultiIndex) Iterate(each func(key, key2 AttributeValue, objects ObjectSlice) bool)
func (*MultiIndex) Lookup ¶
func (i *MultiIndex) Lookup(key, key2 AttributeValue) (ObjectSlice, bool)
type Object ¶
type Object struct {
// contains filtered or unexported fields
}
func (*Object) AbsorbEx ¶
Absorbs data and Pwn relationships from another object, sucking the soul out of it The sources empty shell should be discarded afterwards (i.e. not appear in an Objects collection)
func (*Object) Add ¶
func (o *Object) Add(a Attribute, values ...AttributeValue)
func (*Object) Attr ¶
func (o *Object) Attr(attr Attribute) AttributeValues
Returns synthetic blank attribute value if it isn't set
func (*Object) AttrIterator ¶
func (o *Object) AttrIterator(f func(attr Attribute, avs AttributeValues) bool)
func (*Object) AttrRendered ¶
func (o *Object) AttrRendered(attr Attribute) AttributeValues
func (*Object) AttrString ¶
func (*Object) Children ¶
func (o *Object) Children() ObjectSlice
func (*Object) EdgeIteratorRecursive ¶
func (o *Object) EdgeIteratorRecursive(direction EdgeDirection, edgeMatch EdgeBitmap, excludemyself bool, af func(source, target *Object, edge EdgeBitmap, depth int) bool)
func (*Object) EdgeToEx ¶
Enhanched Pwns function that allows us to force the pwn (normally self-pwns are filtered out)
func (*Object) Edges ¶
func (o *Object) Edges(direction EdgeDirection) *EdgeConnectionsPlus
func (*Object) Get ¶
func (o *Object) Get(attr Attribute) (AttributeValues, bool)
Auto locking version
func (*Object) HasAttrValue ¶
func (o *Object) HasAttrValue(attr Attribute, hasvalue AttributeValue) bool
func (*Object) HasTag ¶
FIXME performance optimization/redesign needed, but needs to work with Objects indexes
func (*Object) MarshalJSON ¶
func (*Object) MarshalXML ¶
func (*Object) NameStringMap ¶
func (*Object) OneAttr ¶
func (o *Object) OneAttr(attr Attribute) AttributeValue
func (*Object) OneAttrRaw ¶
func (*Object) OneAttrRendered ¶
func (*Object) OneAttrString ¶
func (*Object) PrimaryID ¶
func (o *Object) PrimaryID() (Attribute, AttributeValue)
func (*Object) SecurityDescriptor ¶
func (o *Object) SecurityDescriptor() (*SecurityDescriptor, error)
Return parsed security descriptor
func (*Object) Set ¶
func (o *Object) Set(a Attribute, values ...AttributeValue)
func (*Object) Type ¶
func (o *Object) Type() ObjectType
type ObjectEdge ¶
type ObjectEdge struct {
// contains filtered or unexported fields
}
type ObjectSlice ¶
type ObjectSlice struct {
// contains filtered or unexported fields
}
func NewObjectSlice ¶
func NewObjectSlice(prealloc int) ObjectSlice
func (*ObjectSlice) Add ¶
func (os *ObjectSlice) Add(o *Object)
func (ObjectSlice) First ¶
func (os ObjectSlice) First() *Object
func (ObjectSlice) Iterate ¶
func (os ObjectSlice) Iterate(af func(o *Object) bool)
func (ObjectSlice) Len ¶
func (os ObjectSlice) Len() int
func (*ObjectSlice) Limit ¶
func (os *ObjectSlice) Limit(count int)
func (*ObjectSlice) Remove ¶
func (os *ObjectSlice) Remove(o *Object)
func (*ObjectSlice) Skip ¶
func (os *ObjectSlice) Skip(count int)
func (*ObjectSlice) Sort ¶
func (os *ObjectSlice) Sort(attr Attribute, reverse bool)
func (*ObjectSlice) SortFunc ¶
func (os *ObjectSlice) SortFunc(lessthan func(o, o2 *Object) bool)
type ObjectType ¶
type ObjectType byte
func NewObjectType ¶
func NewObjectType(name, lookup string) ObjectType
func ObjectTypeLookup ¶
func ObjectTypeLookup(lookup string) (ObjectType, bool)
func (ObjectType) Lookup ¶
func (ot ObjectType) Lookup() string
func (ObjectType) SetDefault ¶
func (ot ObjectType) SetDefault(enabled bool) ObjectType
func (ObjectType) String ¶
func (ot ObjectType) String() string
func (ObjectType) ValueString ¶
func (ot ObjectType) ValueString() AttributeValueString
type Objects ¶
type Objects struct { Datapath string DefaultValues []any // contains filtered or unexported fields }
func NewLoaderObjects ¶
func NewObjects ¶
func NewObjects() *Objects
func (*Objects) AddDefaultFlex ¶
func (*Objects) AddRelaxed ¶
func (*Objects) AsSlice ¶
func (os *Objects) AsSlice() ObjectSlice
func (*Objects) DistinguishedParent ¶
func (*Objects) DropIndexes ¶
func (os *Objects) DropIndexes()
func (*Objects) Find ¶
func (os *Objects) Find(attribute Attribute, value AttributeValue) (o *Object, found bool)
func (*Objects) FindMulti ¶
func (os *Objects) FindMulti(attribute Attribute, value AttributeValue) (ObjectSlice, bool)
func (*Objects) FindMultiOrAdd ¶
func (os *Objects) FindMultiOrAdd(attribute Attribute, value AttributeValue, addifnotfound func() *Object) (ObjectSlice, bool)
func (*Objects) FindOrAddAdjacentSID ¶
func (*Objects) FindOrAddAdjacentSIDFound ¶
func (*Objects) FindOrAddObject ¶
func (*Objects) FindOrAddSID ¶
func (os *Objects) FindOrAddSID(s windowssecurity.SID) *Object
func (*Objects) FindTwo ¶
func (os *Objects) FindTwo(attribute Attribute, value AttributeValue, attribute2 Attribute, value2 AttributeValue) (o *Object, found bool)
func (*Objects) FindTwoMulti ¶
func (os *Objects) FindTwoMulti(attribute Attribute, value AttributeValue, attribute2 Attribute, value2 AttributeValue) (o ObjectSlice, found bool)
func (*Objects) FindTwoMultiOrAdd ¶
func (os *Objects) FindTwoMultiOrAdd(attribute Attribute, value AttributeValue, attribute2 Attribute, value2 AttributeValue, addifnotfound func() *Object) (ObjectSlice, bool)
func (*Objects) FindTwoOrAdd ¶
func (os *Objects) FindTwoOrAdd(attribute Attribute, value AttributeValue, attribute2 Attribute, value2 AttributeValue, flexinit ...any) (o *Object, found bool)
func (*Objects) GetMultiIndex ¶
func (os *Objects) GetMultiIndex(attribute, attribute2 Attribute) *MultiIndex
func (*Objects) IterateParallel ¶
func (*Objects) MergeOrAdd ¶
func (*Objects) ReindexObject ¶
func (*Objects) Statistics ¶
func (os *Objects) Statistics() typestatistics
func (*Objects) Subordinates ¶
type Probability ¶
type Probability int8
const ( MINPROBABILITY Probability = -1 MAXPROBABILITY Probability = 100 )
type ProbabilityCalculatorFunction ¶
type ProbabilityCalculatorFunction func(source, target *Object, edge *EdgeBitmap) Probability
type ProcessPriority ¶
type ProcessPriority int
const ( BeforeMergeLow ProcessPriority = iota BeforeMerge BeforeMergeHigh BeforeMergeFinal AfterMergeLow AfterMerge AfterMergeHigh AfterMergeFinal )
func ProcessPriorityString ¶
func ProcessPriorityString(s string) (ProcessPriority, error)
ProcessPriorityString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func ProcessPriorityValues ¶
func ProcessPriorityValues() []ProcessPriority
ProcessPriorityValues returns all values of the enum
func (ProcessPriority) IsAProcessPriority ¶
func (i ProcessPriority) IsAProcessPriority() bool
IsAProcessPriority returns "true" if the value is listed in the enum definition. "false" otherwise
func (ProcessPriority) String ¶
func (i ProcessPriority) String() string
type ProcessorFunc ¶
type ProcessorFunc func(ao *Objects)
type ProgressCallbackFunc ¶
type SecurityDescriptor ¶
type SecurityDescriptor struct { Raw string Owner windowssecurity.SID Group windowssecurity.SID SACL ACL DACL ACL Control SecurityDescriptorControlFlag }
func CacheOrParseSecurityDescriptor ¶
func CacheOrParseSecurityDescriptor(rawsd string) (*SecurityDescriptor, error)
Parse and cache security descriptor
func (*SecurityDescriptor) Equals ¶
func (sd *SecurityDescriptor) Equals(sd2 *SecurityDescriptor) bool
func (*SecurityDescriptor) Parse ¶
func (sd *SecurityDescriptor) Parse() error
func (SecurityDescriptor) String ¶
func (sd SecurityDescriptor) String(ao *Objects) string
func (SecurityDescriptor) StringNoLookup ¶
func (sd SecurityDescriptor) StringNoLookup() string
type SecurityDescriptorControlFlag ¶
type SecurityDescriptorControlFlag uint16
type StartLength ¶
type StartLength struct {
// contains filtered or unexported fields
}
Source Files ¶
- attributes.go
- attributevalue.go
- attributevaluemap.go
- const.go
- edge.go
- edgeanalyzers.go
- edgeconnections.go
- edgeconnplus.go
- edgedirection.go
- edgedirection_enums.go
- enums.go
- index.go
- loaders.go
- object.go
- objectindex.go
- objects.go
- objectslice.go
- objecttype.go
- processing.go
- run.go
- securitydescriptor.go
- securitydescriptorcache.go