MerkleMap Command-Line Interface (CLI)

The MerkleMap CLI is a powerful tool that allows you to interact with MerkleMap's functionality directly from your terminal. With the CLI, you can perform subdomain searches, tail live subdomain discoveries, and more.

Installation

To install the MerkleMap CLI, follow these steps:

  1. Ensure you have the rust toolchain installed on your system.
  2. Open your terminal and run the following command to install the CLI:
cargo install merklemap-cli
  1. Verify the installation by running:
merklemap-cli --version

If the installation was successful, you should see the version number of the MerkleMap CLI.

Usage

To use the MerkleMap CLI, open your terminal and run the merklemap-cli command followed by the desired subcommand and options. Here's the general syntax:

merklemap-cli <COMMAND> [OPTIONS]

Available Commands

The MerkleMap CLI provides the following commands:

  • search: Search for subdomains matching a given query.
  • tail: Tail live subdomain discoveries from the MerkleMap ingestion pipeline.
  • help: Print the help message or the help of the given subcommand(s).

To get more information about a specific command, run:

merklemap-cli <COMMAND> --help

Options

The MerkleMap CLI supports the following options:

  • -h, --help: Print the help message.
  • -V, --version: Print the version number.

Data Format

Search Output

The search command outputs results in the following format:

domain= subject_common_name= not_before= human_readable_not_before=
  • domain: The full hostname.
  • subject_common_name: The common name (CN) from the SSL/TLS certificate.
  • not_before: The timestamp indicating the start of the certificate's validity period.
  • human_readable_not_before: The formatted date representation of the not_before timestamp.

Tail Output

The tail command outputs results in the following format:

hostname= timestamp= human_readable_not_before=
  • hostname: The discovered subdomain hostname.
  • timestamp: The ISO 8601 formatted timestamp indicating when the subdomain was discovered.
  • human_readable_not_before: The formatted date representation of the not_before timestamp from the associated SSL/TLS certificate.

Examples

Here are a few examples of using the MerkleMap CLI:

  1. Search for subdomains matching a specific query:
merklemap-cli search "example.com"

This command searches for subdomains related to "example.com" and displays the results.

  1. Tail live subdomain discoveries:
merklemap-cli tail

This command starts tailing live subdomain discoveries from the MerkleMap ingestion pipeline, displaying new subdomains as they are discovered.

  1. Get help for a specific command:
merklemap-cli search --help

This command displays the help information for the search command, providing details about its usage and available options.

Conclusion

The MerkleMap CLI provides a convenient way to interact with MerkleMap's functionality directly from your terminal. Whether you want to search for subdomains or tail live discoveries, the CLI offers a streamlined and efficient interface. By leveraging the power of the CLI, you can integrate MerkleMap into your workflows and automate various tasks related to subdomain enumeration and monitoring.

For more detailed information about each command and its options, refer to the MerkleMap CLI GitHub repository.

Was this page helpful?