public FileSystemCollector(CollectorOptions?opts = null, Action <CollectObject>?changeHandler = null) : base(opts, changeHandler) { Roots.AddRange(opts?.SelectedDirectories ?? Array.Empty <string>()); if (!Roots.Any()) { if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { foreach (var driveInfo in DriveInfo.GetDrives()) { if (driveInfo.IsReady && driveInfo.DriveType == DriveType.Fixed) { Roots.Add(driveInfo.Name); } } } else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { Roots.Add("/"); } else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { Roots.Add("/"); } } }
public RegistryCollector(CollectorOptions?opts = null, Action <CollectObject>?changeHandler = null) : base(opts, changeHandler) { this.opts = opts ?? this.opts; Hives = DefaultHives; if (opts != null) { Parallelize = !opts.SingleThread; if (opts.SelectedHives.Any()) { Hives = new List <(RegistryHive, string)>(); foreach (var hive in opts.SelectedHives) { var innerSplit = hive.Split('\\'); if (Enum.TryParse(typeof(RegistryHive), innerSplit[0], out object?result)) { if (result is RegistryHive selectedHive) { Hives.Add((selectedHive, innerSplit.Length > 1 ? string.Join('\\', innerSplit[1..]) : string.Empty));
public FileSystemCollector(CollectorOptions?opts = null, Action <CollectObject>?changeHandler = null) : base(opts, changeHandler) { Roots.AddRange(opts?.SelectedDirectories ?? new List <string>()); if (!Roots.Any()) { if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { foreach (var driveInfo in DriveInfo.GetDrives()) { if (driveInfo.IsReady && driveInfo.DriveType == DriveType.Fixed) { Roots.Add(driveInfo.Name); } } } else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { foreach (var directory in Directory.EnumerateDirectories("/")) { if (!directory.Equals("/proc") && !directory.Equals("/sys")) { Roots.Add(directory); } else { Log.Debug("Default settings skip directories /proc and /sys because they tend to have non-files which stall the collector."); } } } else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { Roots.Add("/"); } } }
public ServiceCollector(CollectorOptions?opts = null, Action <CollectObject>?changeHandler = null) : base(opts, changeHandler) { }
public CryptographicKeyCollector(CollectorOptions?opts = null, Action <CollectObject>?changeHandler = null) : base(opts, changeHandler) { }
protected BaseCollector(CollectorOptions?opts, Action <CollectObject>?changeHandler) { this.opts = opts ?? new CollectorOptions(); this.changeHandler = changeHandler; }
/// <summary> /// </summary> /// <param name="opts"></param> /// <param name=""></param> public CertificateCollector(CollectorOptions?opts = null, Action <CollectObject>?changeHandler = null) : base(opts, changeHandler) { }
public WifiCollector(CollectorOptions?options = null, Action <CollectObject>?action = null) : base(options, action) { }
public TpmCollector(CollectorOptions?opts, Action <CollectObject>?changeHandler, bool TestMode = false) : base(opts, changeHandler) { this.TestMode = TestMode; }
public UserAccountCollector(CollectorOptions?opts = null, Action <CollectObject>?changeHandler = null) : base(opts, changeHandler) { }