# Subfinder Tool

## Introduction:

`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. ([https://github.com/projectdiscovery/subfinder](https://github.com/projectdiscovery/subfinder))

## Installation:

1. Locate [https://github.com/projectdiscovery/subfinder](https://github.com/projectdiscovery/subfinder)
    
2. Open terminal
    
3. Enter the following command:
    
    ```bash
    go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest
    ```
    

## Usage:

1. \-h
    
    This is the most common tag that is used to display all the available options which can be used with the tool.
    

```bash
subfinder -h 
```

1. \-d
    
    It is used to specify the domain name or website
    

```bash
subfinder -d google.com
```

1. \-dL
    
    It is used to specify the list of domains contained in a file
    

```bash
subfinder -dL domain_list.txt
#domain_list contains all the domains.
```

1. \-s
    
    It is used to specify the source to fetch the subdomains
    

```bash
subfinder -s github
```

1. \-all
    
    It is used to search subdomains from all sources ( note: takes more time)
    

```bash
subfinder -d google.com -all
```

1. \-es
    
    It is used to exclude the source to fetch subdomains
    

```bash
subfinder -d google.com -es
```

1. \-rl
    
    It is used to specify the number of HTTP requests per second
    

```bash
subfinder -d google.com -rl <any_number>
```

1. \-timeout
    
    It is used to specify the number of seconds before timing out
    

```bash
subfinder -d google.com -timeout <any_number>
```

1. \-o
    
    It specifies the file to append the output
    

```bash
subfinder -d google.com -o output.txt
```

1. \-oJ
    
    It specifies the target output file, but the result will be in JSON format
    

```bash
subfinder -d google.com -oJ output_in_json.txt
```

These are the top 10 flags used in the subfinder tool

### Other flags

| FLAG | DESCRIPTION | COMMAND |
| --- | --- | --- |
| \-v | Verbose | subfinder -v -d google.com |
| \-version | Show the version number of subfinder | subfinder -version |
| \-silent | show only subdomains in the output | subfinder -silent -d google.com |
| \-nc | Disable color in the output | subfinder -nc -d google.com |

Explore other flags using the -h flag.

## Want more subdomains?

Non - configured subfinder will yield fewer subdomains only !!!

1. Locate `$HOME/.config/subfinder/provider-config.yaml`
    
    &
    
2. Locate `$HOME/.config/subfinder/config.yaml`
    

Configure these .yaml files with your API keys.

Happy Learning. Cheers🙌❤️
