{"id":18562524,"url":"https://github.com/root4loot/dnsgrab","last_synced_at":"2025-05-15T17:36:18.614Z","repository":{"id":161258074,"uuid":"635307529","full_name":"root4loot/dnsgrab","owner":"root4loot","description":"A Go tool for grabbing DNS servers from one or multiple hosts","archived":false,"fork":false,"pushed_at":"2023-11-28T18:25:22.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-17T12:45:39.811Z","etag":null,"topics":["dns","enumeration","go","golang","network","recon","resolvers"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/root4loot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-02T12:19:49.000Z","updated_at":"2023-05-02T12:26:10.000Z","dependencies_parsed_at":"2023-11-28T18:49:22.720Z","dependency_job_id":null,"html_url":"https://github.com/root4loot/dnsgrab","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/root4loot%2Fdnsgrab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/root4loot%2Fdnsgrab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/root4loot%2Fdnsgrab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/root4loot%2Fdnsgrab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/root4loot","download_url":"https://codeload.github.com/root4loot/dnsgrab/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254388567,"owners_count":22063078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dns","enumeration","go","golang","network","recon","resolvers"],"created_at":"2024-11-06T22:09:59.537Z","updated_at":"2025-05-15T17:36:18.597Z","avatar_url":"https://github.com/root4loot.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Go version](https://img.shields.io/badge/Go-v1.19-blue.svg) [![Contribute](https://img.shields.io/badge/Contribute-Welcome-green.svg)](CONTRIBUTING.md)\n\n# dnsgrab\n\nThis is a simple Go library and CLI tool that allows you to retrieve DNS servers from one or multiple hosts. When querying domains, the library incorporates a curated list of public resolvers from the [publicresolvers](https://github.com/root4loot/publicresolvers) library, expanding the available options for DNS resolution alongside the ability to provide your own custom resolvers using appropriate flags.\n\n## Installation\n\n### Go\n```\ngo install github.com/root4loot/dnsgrab/cmd/dnsgrab@latest\n```\n\n### Docker\n```\ngit clone https://github.com/root4loot/dnsgrab.git \u0026\u0026 cd dnsgrab\ndocker build -t dnsgrab .\ndocker run -it dnsgrab -h\n```\n\n## Usage\n```\nUsage: ./dnsgrab [options] (-h \u003chost\u003e|-i hosts.txt)\n\nTARGETTING:\n   -h,   --host          target host (comma separated)\n   -i,   --infile        file containing hosts (newline separated)\n\nCONFIGURATIONS:\n   -r,  --resolvers      file containing list of resolvers   \n   -c,  --concurrency    number of concurrent requests       (Default: 10 requests)\n   -t,  --timeout        max request timeout                 (Default: 3 seconds)\n   -d,  --delay          delay between requests              (Default: 0 milliseconds)\n   -dj, --delay-jitter   max jitter between requests         (Default: 0 milliseconds)\n\nOUTPUT:\n   -o,  --outfile        output results to given file\n   -s,  --silence        silence everything\n   -v,  --verbose        verbose output\n        --version        display version\n```\n\n## Examples\n```\n$ dnsgrab -h hackerone.com\n104.16.99.52:53\n```\n\n```\n$ dnsgrab -i hosts.txt\n104.16.62.39:53\n104.17.206.78:53\n104.18.69.91:53\n104.18.110.82:53\n104.18.107.24:53\n104.17.70.206:53\n104.16.99.52:53\n104.18.70.91:53\n35.166.157.178:53\n35.166.157.178:53\n104.17.73.206:53\n10.13.22.219:53\n```\n\n\n## Library\n```\ngo get -u github.com/root4loot/dnsgrab\n```\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/root4loot/dnsgrab\"\n)\n\nfunc main() {\n\tsingle()\n\tmultiple()\n\tmultipleStream()\n}\n\nfunc single() {\n\tfmt.Println(\"Running against single host\")\n\tresult := dnsgrab.Single(\"hackerone.com\")\n\tfmt.Println(\"Query host\", result.RequestedHost, \"Resolver Address\", result.ResolverAddress)\n}\n\nfunc multiple() {\n\tfmt.Println(\"Running against multiple hosts\")\n\tresults := dnsgrab.Multiple([]string{\"hackerone.com\", \"bugcrowd.com\", \"intigriti.com\"})\n\tfor _, result := range results {\n\t\tfmt.Println(\"Query host\", result.RequestedHost, \"Resolver Address\", result.ResolverAddress)\n\t}\n}\n\nfunc multipleStream() {\n\tfmt.Println(\"Running against multiple hosts (async)\")\n\ttargets := []string{\"hackerone.com\", \"bugcasdasdrowd.com\", \"intigriti.com\"}\n\n\t// initialize runner\n\tdnsgrab := dnsgrab.NewRunner()\n\n\t// OPTIONAL: set options\n\t// dnsgrab.Options.Resolvers = []string{\"\"}\n\t// dnsgrab.Options.Concurrency = 0\n\t// dnsgrab.Options.Timeout = 0\n\t// dnsgrab.Options.Delay = 0\n\t// dnsgrab.Options.DelayJitter = 0\n\tdnsgrab.Options.Verbose = true\n\n\t// process results\n\tgo func() {\n\t\tfor result := range dnsgrab.Results {\n\t\t\tfmt.Println(\"Query host\", result.RequestedHost, \"Resolver Address\", result.ResolverAddress)\n\t\t}\n\t}()\n\n\t// run dnsgrab against targets\n\tdnsgrab.MultipleStream(targets...)\n}\n\n```\n\n---\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froot4loot%2Fdnsgrab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froot4loot%2Fdnsgrab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froot4loot%2Fdnsgrab/lists"}