d3mondev / puredns

Puredns is a fast domain resolver and subdomain bruteforcing tool that can accurately filter out wildcard subdomains and DNS poisoned entries.
GNU General Public License v3.0
1.61k stars 151 forks source link

puredns error: error resolving domains: exit status 1 #17

Closed atikrahman1 closed 2 years ago

atikrahman1 commented 2 years ago

Hi ,

Everything seems fine. Massdns installed but puredns throwing error that puredns error: error resolving domains: exit status 1

I trace the issue. The problem is actually in massdns. that massdns will not allow you to run massdns without supplying --root argument when you are the root user. Puredns doesn't supply the --root argument while running the massdns.

image

atikrahman1 commented 2 years ago

I have solved the issue by editing the

https://github.com/d3mondev/puredns/blob/dc73bee6d3b580ffc82db7602a9d9708b1659269/pkg/massdns/runner.go#L41 What I did is to solve this problem edit this code and added --root argument end of the command.

args := []string{"-q", "-r", resolvers, "-o", "Snl", "-t", "A", "--root", "--retry", "REFUSED", "--retry", "SERVFAIL", "-w", output}

and rebuild the package.

step to solve

  1. Go to /root/go/pkg/mod/github.com/d3mondev/puredns/v2@v2.0.1/pkg/massdns/runner.go

  2. Edit and save the file

  3. cd /root/go/pkg/mod/github.com/d3mondev/puredns/v2@v2.0.1

  4. go install

gprime31 commented 2 years ago

Should PIN this. Great find!

d3mondev commented 1 year ago

Puredns now supports running massdns as root since v2.1.0!