subfinder README

The project's README from github.com/projectdiscovery/subfinder. As one markdown file: README.md.

subfinder

Fast passive subdomain enumeration tool.

Features • Install • Usage • API Setup • Library • Join 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

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
  -mr, -max-results int         limit the number of results per source (0 = unlimited; honored by paginating sources)

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 (-oJ for JSON)

OPTIMIZATION:
  -timeout int                  seconds to wait before timing out (default 30)
  -max-time int                 minutes to wait for enumeration results (default 10)
  -rsr, -response-size-read int max response body size to read in bytes from passive sources (0 = unlimited)

Environment Variables

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

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.

subfinder (projectdiscovery/subfinder)

Searching Database…

14.6K ·GitHub
这是什么?Subfinder 是一款快速的被动子域名枚举工具,通过查询公开的被动数据源,为网站返回有效的子域名,专为渗透测试人员和漏洞赏金猎人打造。
它只是命令行工具,还是也能当作库来用?它主要是命令行工具,但也提供 Go 语言库(SDK),你可以直接将其导入自己的 Go 程序中用于子域名枚举。
使用它需要 API 密钥吗?安装后可以直接运行 Subfinder,但它的许多被动数据源需要 API 密钥才能真正返回结果,密钥通过 provider-config.yaml 文件进行配置。
它会做主动扫描或暴力破解吗?不会,它严格属于被动模式,只查询精选的被动数据源,不进行主动探测。这使它速度快、隐蔽性好,但结果也仅限于这些数据源所公开的内容。
这个工具主要是为谁设计的?它面向渗透测试人员和漏洞赏金猎人,帮助他们在侦察工作流程中快速、隐蔽地发现子域名。
我能在任何操作系统上运行它吗?可以,它是 Go 编译的二进制程序,可以在 Linux、macOS 和 Windows 上跨平台运行。
它会遵守所查询数据源的授权条款吗?会的,该项目设计上遵守其所集成的所有被动数据源的使用限制和许可协议。
它支持哪些输出格式?Subfinder 支持多种输出格式,包括 JSON、文件输出和标准输出(stdout),并且可以很好地通过 STDIN/STDOUT 与其他工具串联使用。
我可以自定义配置文件的存放位置吗?可以,你可以通过 SUBFINDER_CONFIG 和 SUBFINDER_PROVIDER_CONFIG 环境变量覆盖默认的配置文件和 provider-config 路径。
有 Docker 镜像可用吗?有,该项目提供 Docker 支持,你无需在本地安装 Go 即可在容器中运行 Subfinder。
Size
10.1 MB
Stars
14.6K
Age
8y
Commits · 90 Days