< Summary

Class:SharpHoundCommonLib.OutputTypes.Computer
Assembly:SharpHoundCommonLib
File(s):D:\a\SharpHoundCommon\SharpHoundCommon\src\CommonLib\OutputTypes\Computer.cs
Covered lines:0
Uncovered lines:14
Coverable lines:14
Total lines:52
Line coverage:0% (0 of 14)
Covered branches:0
Total branches:0

File(s)

D:\a\SharpHoundCommon\SharpHoundCommon\src\CommonLib\OutputTypes\Computer.cs

#LineLine coverage
 1using System;
 2
 3namespace SharpHoundCommonLib.OutputTypes
 4{
 5    /// <summary>
 6    ///     Represents a computer object in Active Directory. Contains all the properties BloodHound cares about
 7    /// </summary>
 8    public class Computer : OutputBase
 9    {
 010        public string PrimaryGroupSID { get; set; }
 011        public TypedPrincipal[] AllowedToDelegate { get; set; } = Array.Empty<TypedPrincipal>();
 012        public TypedPrincipal[] AllowedToAct { get; set; } = Array.Empty<TypedPrincipal>();
 013        public TypedPrincipal[] HasSIDHistory { get; set; } = Array.Empty<TypedPrincipal>();
 014        public TypedPrincipal[] DumpSMSAPassword { get; set; } = Array.Empty<TypedPrincipal>();
 015        public SessionAPIResult Sessions { get; set; } = new();
 016        public SessionAPIResult PrivilegedSessions { get; set; } = new();
 017        public SessionAPIResult RegistrySessions { get; set; } = new();
 018        public LocalGroupAPIResult[] LocalGroups { get; set; } = Array.Empty<LocalGroupAPIResult>();
 019        public UserRightsAssignmentAPIResult[] UserRights { get; set; } = Array.Empty<UserRightsAssignmentAPIResult>();
 020        public DCRegistryData DCRegistryData { get; set; } = new();
 021        public ComputerStatus Status { get; set; }
 022        public bool IsDC { get; set; }
 023        public string DomainSID { get; set; }
 24    }
 25
 26    public class DCRegistryData
 27    {
 28        public IntRegistryAPIResult CertificateMappingMethods { get; set; }
 29        public IntRegistryAPIResult StrongCertificateBindingEnforcement { get; set; }
 30    }
 31
 32    public class ComputerStatus
 33    {
 34        public bool Connectable { get; set; }
 35        public string Error { get; set; }
 36
 37        public static string NonWindowsOS => "NonWindowsOS";
 38        public static string OldPwd => "PwdLastSetOutOfRange";
 39        public static string PortNotOpen => "PortNotOpen";
 40        public static string Success => "Success";
 41
 42        public CSVComputerStatus GetCSVStatus(string computerName)
 43        {
 44            return new CSVComputerStatus
 45            {
 46                Status = Error,
 47                Task = "CheckAvailability",
 48                ComputerName = computerName
 49            };
 50        }
 51    }
 52}