Show / Hide Table of Contents

Class ServiceCollector

Collects metadata about services registered on the system.

Inheritance
System.Object
BaseCollector
ServiceCollector
Implements
IPlatformRunnable
Inherited Members
BaseCollector.Results
BaseCollector.TryExecute()
BaseCollector.RunStatus
BaseCollector.Start()
BaseCollector.Stop()
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 Source

ServiceCollector(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 Source

CanRunOnPlatform()

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
BaseCollector.CanRunOnPlatform()
| Improve this Doc View Source

ExecuteInternal()

Executes the ServiceCollector.

Declaration
public override void ExecuteInternal()
Overrides
BaseCollector.ExecuteInternal()
| Improve this Doc View Source

ExecuteLinux()

Uses systemctl (relies on systemd) and also checks /etc/init.d

Declaration
public void ExecuteLinux()
| Improve this Doc View Source

ExecuteMacOs()

Uses launchctl

Declaration
public void ExecuteMacOs()
| Improve this Doc View Source

ExecuteWindows()

Uses ServiceController.

Declaration
public void ExecuteWindows()

Implements

IPlatformRunnable
  • Improve this Doc
  • View Source
Back to top Generated by DocFX