Skip to content

DumpCrt A Script for Dumping crt.sh Database

Hossein Shourabi edited this page Jun 4, 2023 · 1 revision

DumpCrt is a Bash script designed to extract data from the crt.sh database. It provides an easy way to search for certificates based on various criteria such as target, organization name, and more. The script fetches the data and outputs it to a file, allowing users to analyze and work with the extracted information.

Usage:

./crtsh -u <target> [OPTIONS]

Options:

  • -o | --orgName: Search for certificates based on organization name.
  • -u: Specify the target or name for the search.
  • --web: Quickly dump data from small targets.
  • -l | --limit: Limit the count of data to fetch per request. (default is 300).
  • -y | --yaml: Generate output in YAML format (default is false).
  • -p | --path: Specify the file path to write the output to.
  • -s | --silent: Remove dummy text and generate clean output.
  • -h | --help: Display help information.

Examples:

Dump certificates for a target and write the output to a file:

./crtsh -u walmart.com -p ~/target.subs

Search for certificates based on an organization name and generate clean output:

./crtsh -u walmart.com -o --silent

Dump certificates for a target and generate output in YAML format:

./crtsh -u walmart.com -y ~/target.yaml

Increase the count of data to fetch per request (e.g., 500):

./crtsh -u walmart --limit 500

Fetch a large number of records silently, and write to a file:

./crtsh -u disney -l 2000 --silent | tee disney-crtsh.subs

Fetch data without using the API

./crtsh -u disney --web | tee disney-crtsh.subs

Notes:

The script uses the crt.sh API to fetch data from the database.

By default, the script fetches certificates based on the target specified using the -u option.

  • The -o option allows searching for certificates based on the organization name.
  • The --web option provides a faster way to dump data from small targets directly without using the API.