Configuration

class sliver.config.SliverClientConfig(operator, lhost, lport, ca_certificate, certificate, private_key, token)[source]

This class parses and represents Sliver operator configuration files, typically this class is automatically instantiated using one of the class methods SliverClientConfig.parse_config() or SliverClientConfig.parse_config_file() but can be directly instantiated too.

Parameters
  • operator (str) – Operator name, note that this value is only used by the client and is ignored by the server.

  • lhost (str) – The listener host to connect to (i.e., the Sliver server host).

  • lhost – The TCP port of the host listener (i.e., the TCP port of the Sliver “multiplayer” service).

  • ca_certificate (str) – The Sliver server certificate authority.

  • certificate (str) – The mTLS client certificate.

  • private_key (str) – The mTLS private key.

  • token (str) – The user’s authentication token.

Raises

ValueError – A parameter contained an invalid value.

classmethod parse_config(data)[source]

Parses the content of a Sliver operator configuration file and returns the instantiated SliverClientConfig

Parameters

data (Union[str, bytes]) – The Sliver operator configuration file content.

Returns

An instantiated SliverClientConfig object.

Return type

SliverClientConfig

classmethod parse_config_file(filepath)[source]

Parse a given file path as a Sliver operator configuration file.

Parameters

filepath (str) – File system path to an operator configuration file.

Returns

An instantiated SliverClientConfig object.

Return type

SliverClientConfig