# subfinder **Repository Path**: serialt/subfinder ## Basic Information - **Project Name**: subfinder - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-01-15 - **Last Updated**: 2022-06-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
Features • Install • Usage • API Setup • Library • Join Discord
--- Subfinder is a subdomain discovery tool that discovers valid subdomains for websites by 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 designed subfinder to comply with all passive sources licenses, and usage restrictions, as well as maintained a consistently passive model to make it useful to both penetration testers and bug bounty hunters alike. # Features
| ## Subfinder with docker Pull the latest tagged [subfinder](https://hub.docker.com/r/projectdiscovery/subfinder) docker image: ```sh docker pull projectdiscovery/subfinder:latest ``` Running subfinder using docker image: ```sh docker -t projectdiscovery/subfinder:latest -d hackerone.com ``` Running subfinder using docker image with local config file: ```sh docker run -v $HOME/.config/subfinder:/root/.config/subfinder -t projectdiscovery/subfinder -d hackerone.com ``` |
| ## Subfinder Go library Usage example: ```go package main import ( "bytes" "context" "fmt" "io" "log" "github.com/projectdiscovery/subfinder/v2/pkg/passive" "github.com/projectdiscovery/subfinder/v2/pkg/resolve" "github.com/projectdiscovery/subfinder/v2/pkg/runner" ) func main() { runnerInstance, err := runner.NewRunner(&runner.Options{ Threads: 10, // Thread controls the number of threads to use for active enumerations Timeout: 30, // Timeout is the seconds to wait for sources to respond MaxEnumerationTime: 10, // MaxEnumerationTime is the maximum amount of time in mins to wait for enumeration Resolvers: resolve.DefaultResolvers, // Use the default list of resolvers by marshaling it to the config Sources: passive.DefaultSources, // Use the default list of passive sources AllSources: passive.DefaultAllSources, // Use the default list of all passive sources Recursive: passive.DefaultRecursiveSources, // Use the default list of recursive sources Providers: &runner.Providers{}, // Use empty api keys for all providers }) buf := bytes.Buffer{} err = runnerInstance.EnumerateSingleDomain(context.Background(), "projectdiscovery.io", []io.Writer{&buf}) if err != nil { log.Fatal(err) } data, err := io.ReadAll(&buf) if err != nil { log.Fatal(err) } fmt.Printf("%s", data) } ``` |