Class ServiceCollector
Collects metadata about services registered on the system.
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: AttackSurfaceAnalyzer.Collectors
Assembly: AsaLib.dll
Syntax
public class ServiceCollector : BaseCollector, IPlatformRunnable
Constructors
| Improve this Doc View SourceServiceCollector(CollectCommandOptions, Action<CollectObject>)
Declaration
public ServiceCollector(CollectCommandOptions opts = null, Action<CollectObject> changeHandler = null)
Parameters
| Type | Name | Description |
|---|---|---|
| CollectCommandOptions | opts | |
| System.Action<CollectObject> | changeHandler |
Methods
| Improve this Doc View SourceCanRunOnPlatform()
Determines whether the ServiceCollector can run or not.
Declaration
public override bool CanRunOnPlatform()
Returns
| Type | Description |
|---|---|
| System.Boolean | True on Windows, Linux, Mac OS |
Overrides
| Improve this Doc View SourceExecuteInternal()
Executes the ServiceCollector.
Declaration
public override void ExecuteInternal()
Overrides
| Improve this Doc View SourceExecuteLinux()
Uses systemctl (relies on systemd) and also checks /etc/init.d
Declaration
public void ExecuteLinux()
ExecuteMacOs()
Uses launchctl
Declaration
public void ExecuteMacOs()
ExecuteWindows()
Uses ServiceController.
Declaration
public void ExecuteWindows()