subfinder

module
v2.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 12, 2026 License: MIT

README

subfinder

Fast passive subdomain enumeration tool.

FeaturesInstallUsageAPI SetupLibraryJoin Discord


subfinder is a subdomain discovery tool that returns valid subdomains for websites, using passive online sources. It has a simple, modular architecture and is optimized for speed. subfinder is built for doing one thing only - passive subdomain enumeration, and it does that very well.

We have made it to comply with all the used passive source licenses and usage restrictions. The passive model guarantees speed and stealthiness that can be leveraged by both penetration testers and bug bounty hunters alike.

Features

subfinder

  • Fast and powerful resolution and wildcard elimination modules
  • Curated passive sources to maximize results
  • Multiple output formats supported (JSON, file, stdout)
  • Optimized for speed and lightweight on resources
  • STDIN/OUT support enables easy integration into workflows

Usage

subfinder -h

This will display help for the tool. Here are all the switches it supports.

Usage:
  ./subfinder [flags]

Flags:
INPUT:
  -d, -domain string[]  domains to find subdomains for
  -dL, -list string     file containing list of domains for subdomain discovery

SOURCE:
  -s, -sources string[]           specific sources to use for discovery (-s crtsh,github). Use -ls to display all available sources.
  -recursive                      use only sources that can handle subdomains recursively (e.g. subdomain.domain.tld vs domain.tld)
  -all                            use all sources for enumeration (slow)
  -es, -exclude-sources string[]  sources to exclude from enumeration (-es alienvault,zoomeyeapi)

FILTER:
  -m, -match string[]   subdomain or list of subdomain to match (file or comma separated)
  -f, -filter string[]   subdomain or list of subdomain to filter (file or comma separated)

RATE-LIMIT:
  -rl, -rate-limit int  maximum number of http requests to send per second
  -rls value            maximum number of http requests to send per second for providers in key=value format (-rls "hackertarget=10/s,shodan=15/s")
  -t int                number of concurrent goroutines for resolving (-active only) (default 10)

UPDATE:
  -up, -update                 update subfinder to latest version
  -duc, -disable-update-check  disable automatic subfinder update check

OUTPUT:
  -o, -output string       file to write output to
  -oJ, -json               write output in JSONL(ines) format
  -oD, -output-dir string  directory to write output (-dL only)
  -cs, -collect-sources    include all sources in the output (-json only)
  -oI, -ip                 include host IP in output (-active only)

CONFIGURATION:
  -config string                flag config file (default "$CONFIG/subfinder/config.yaml")
  -pc, -provider-config string  provider config file (default "$CONFIG/subfinder/provider-config.yaml")
  -r string[]                   comma separated list of resolvers to use
  -rL, -rlist string            file containing list of resolvers to use
  -nW, -active                  display active subdomains only
  -proxy string                 http proxy to use with subfinder
  -ei, -exclude-ip              exclude IPs from the list of domains

DEBUG:
  -silent             show only subdomains in output
  -version            show version of subfinder
  -v                  show verbose output
  -nc, -no-color      disable color in output
  -ls, -list-sources  list all available sources

OPTIMIZATION:
  -timeout int   seconds to wait before timing out (default 30)
  -max-time int  minutes to wait for enumeration results (default 10)

Environment Variables

Subfinder supports environment variables to specify custom paths for configuration files:

  • SUBFINDER_CONFIG - Path to config.yaml file (overrides default $CONFIG/subfinder/config.yaml)
  • SUBFINDER_PROVIDER_CONFIG - Path to provider-config.yaml file (overrides default $CONFIG/subfinder/provider-config.yaml)

Installation

subfinder requires go1.24 to install successfully. Run the following command to install the latest version:

go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest

Learn about more ways to install subfinder here: https://docs.projectdiscovery.io/tools/subfinder/install.

Post Installation Instructions

subfinder can be used right after the installation, however many sources required API keys to work. Learn more here: https://docs.projectdiscovery.io/tools/subfinder/install#post-install-configuration.

Running Subfinder

Learn about how to run Subfinder here: https://docs.projectdiscovery.io/tools/subfinder/running.

Subfinder Go library

Subfinder can also be used as library and a minimal examples of using subfinder SDK is available here

Resources

License

subfinder is made with 🖤 by the projectdiscovery team. Community contributions have made the project what it is. See the THANKS.md file for more details.

Read the usage disclaimer at DISCLAIMER.md and contact us for any API removal.

Directories

Path Synopsis
cmd
subfinder command
pkg
passive
Package passive provides capability for doing passive subdomain enumeration on targets.
Package passive provides capability for doing passive subdomain enumeration on targets.
resolve
Package resolve is used to handle resolving records It also handles wildcard subdomains and rotating resolvers.
Package resolve is used to handle resolving records It also handles wildcard subdomains and rotating resolvers.
runner
Package runner implements the mechanism to drive the subdomain enumeration process
Package runner implements the mechanism to drive the subdomain enumeration process
subscraping
Package subscraping contains the logic of scraping agents
Package subscraping contains the logic of scraping agents
subscraping/sources/alienvault
Package alienvault logic
Package alienvault logic
subscraping/sources/anubis
Package anubis logic
Package anubis logic
subscraping/sources/bevigil
Package bevigil logic
Package bevigil logic
subscraping/sources/bufferover
Package bufferover is a bufferover Scraping Engine in Golang
Package bufferover is a bufferover Scraping Engine in Golang
subscraping/sources/builtwith
Package builtwith logic
Package builtwith logic
subscraping/sources/c99
Package c99 logic
Package c99 logic
subscraping/sources/censys
Package censys logic
Package censys logic
subscraping/sources/certspotter
Package certspotter logic
Package certspotter logic
subscraping/sources/chaos
Package chaos logic
Package chaos logic
subscraping/sources/commoncrawl
Package commoncrawl logic
Package commoncrawl logic
subscraping/sources/crtsh
Package crtsh logic
Package crtsh logic
subscraping/sources/digitorus
Package waybackarchive logic
Package waybackarchive logic
subscraping/sources/dnsdb
Package dnsdb logic
Package dnsdb logic
subscraping/sources/dnsdumpster
Package dnsdumpster logic
Package dnsdumpster logic
subscraping/sources/domainsproject
Package domainsproject logic
Package domainsproject logic
subscraping/sources/fofa
Package fofa logic
Package fofa logic
subscraping/sources/github
Package github GitHub search package Based on gwen001's https://github.com/gwen001/github-search github-subdomains
Package github GitHub search package Based on gwen001's https://github.com/gwen001/github-search github-subdomains
subscraping/sources/hackertarget
Package hackertarget logic
Package hackertarget logic
subscraping/sources/hudsonrock
Package hudsonrock logic
Package hudsonrock logic
subscraping/sources/intelx
Package intelx logic
Package intelx logic
subscraping/sources/leakix
Package leakix logic
Package leakix logic
subscraping/sources/merklemap
Package merklemap logic
Package merklemap logic
subscraping/sources/netlas
Package netlas logic
Package netlas logic
subscraping/sources/onyphe
Package onyphe logic
Package onyphe logic
subscraping/sources/profundis
Package profundis logic
Package profundis logic
subscraping/sources/pugrecon
Package pugrecon logic
Package pugrecon logic
subscraping/sources/quake
Package quake logic
Package quake logic
subscraping/sources/rapiddns
Package rapiddns is a RapidDNS Scraping Engine in Golang
Package rapiddns is a RapidDNS Scraping Engine in Golang
subscraping/sources/reconcloud
Package reconcloud logic
Package reconcloud logic
subscraping/sources/redhuntlabs
Package redhuntlabs logic
Package redhuntlabs logic
subscraping/sources/riddler
Package riddler logic
Package riddler logic
subscraping/sources/robtex
Package robtex logic
Package robtex logic
subscraping/sources/securitytrails
Package securitytrails logic
Package securitytrails logic
subscraping/sources/shodan
Package shodan logic
Package shodan logic
subscraping/sources/sitedossier
Package sitedossier logic
Package sitedossier logic
subscraping/sources/thc
Package thc logic
Package thc logic
subscraping/sources/threatbook
Package threatbook logic
Package threatbook logic
subscraping/sources/threatminer
Package threatminer logic
Package threatminer logic
subscraping/sources/virustotal
Package virustotal logic
Package virustotal logic
subscraping/sources/waybackarchive
Package waybackarchive logic
Package waybackarchive logic
subscraping/sources/whoisxmlapi
Package whoisxmlapi logic
Package whoisxmlapi logic
subscraping/sources/windvane
Package windvane logic
Package windvane logic

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL