# Subfinder

To install the Subfinder tool for subdomain enumeration, you need to have a basic understanding of the command line and some experience with using a terminal or command prompt.

Here are the steps to install Subfinder on a Linux or macOS system:

1. Install Go, if you don't have it already installed:

```bash
sudo apt-get install golang-go
```

2. Set up the GOPATH environment variable:

```bash
export GOPATH=$HOME/go
```

3. Install Subfinder:

```bash
go install github.com/projectdiscovery/subfinder/cmd/subfinder@latest
```

4. Once the installation is complete, you can run Subfinder from the terminal by typing:

```bash
subfinder
```

To install Subfinder on a Windows system, you will need to follow a similar process, but some of the commands and steps may be different.

Once Subfinder is installed, you can use it to perform subdomain enumeration on a target domain. For example, to enumerate subdomains for the domain "example.com", you can run the following command:

```bash
subfinder -d example.com
```

To perform a more complete subdomain enumeration on the domain "example.com" using Subfinder, you can use the following command:

```bash
subfinder -d example.com -all -silent -o example_com_output.txt
```

This command will enumerate all possible subdomains for the domain "example.com" using all of the available sources, and it will write the results to a file named "example\_com\_output.txt".

The `-all` option is used to tell Subfinder to use all available sources for subdomain enumeration, including passive sources such as the Alexa top 1 million websites, as well as active sources such as brute force and recon-ng.

The `-silent` option is used to suppress the output to the terminal, which can be useful when performing large-scale enumeration.

The `-o` option is used to specify the output file, which in this case is "example\_com\_output.txt".

Once the command is run, Subfinder will perform the subdomain enumeration, and the results will be saved to the specified output file. You can then review the file to see the list of subdomains for the domain "example.com".

These are the basic steps for performing an advanced subdomain enumeration using Subfinder. You can find more information on the options available with Subfinder by running the following command:

```bash
subfinder -h
```

This will display the help information for the tool, which includes a description of each option and how to use it.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bugbounty-for-starters.humbertojunior.com.br/reconnaissance-phase/subdomain-enumeration/subfinder.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
