{"id":19937162,"url":"https://github.com/d3mondev/resolvermt","last_synced_at":"2025-05-03T14:31:09.297Z","repository":{"id":52294530,"uuid":"348831378","full_name":"d3mondev/resolvermt","owner":"d3mondev","description":"A Golang module to resolve multiple DNS requests concurrently while respecting a rate limit on the resolvers.","archived":false,"fork":false,"pushed_at":"2021-05-26T21:08:40.000Z","size":71,"stargazers_count":12,"open_issues_count":2,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T16:17:18.939Z","etag":null,"topics":["bugbounty","dns","go","golang","infosec","resolver"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/d3mondev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-17T19:40:12.000Z","updated_at":"2024-06-21T06:15:07.000Z","dependencies_parsed_at":"2022-09-12T12:12:30.351Z","dependency_job_id":null,"html_url":"https://github.com/d3mondev/resolvermt","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d3mondev%2Fresolvermt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d3mondev%2Fresolvermt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d3mondev%2Fresolvermt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d3mondev%2Fresolvermt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d3mondev","download_url":"https://codeload.github.com/d3mondev/resolvermt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252203188,"owners_count":21710904,"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":["bugbounty","dns","go","golang","infosec","resolver"],"created_at":"2024-11-12T23:31:16.219Z","updated_at":"2025-05-03T14:31:08.815Z","avatar_url":"https://github.com/d3mondev.png","language":"Go","readme":"# Resolver MT [![GoDoc][doc-img]][doc] [![Coverage Status][cov-img]][cov] ![test][test-img]\n\nThis package provides a multithreaded and thread-safe DNS resolver client for Go. It is used to quickly resolve DNS queries in applications that need to perform requests concurrently, while also respecting a limit of queries per second for each resolver.\n\nCreate a new resolver client and set the resolvers to use, the limit of queries per second and the total number of goroutines to create. When done, close the connections by calling Client.Close().\n\n```\npackage resolvermt_test\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/d3mondev/resolvermt\"\n)\n\nfunc main() {\n\tresolvers := []string{\n\t\t\"8.8.8.8\",\n\t\t\"9.9.9.10\",\n\t\t\"1.1.1.1\",\n\t}\n\n\tdomains := []string{\n\t\t\"www.google.com\",\n\t\t\"facebook.com\",\n\t\t\"uber.com\",\n\t\t\"apple.com\",\n\t\t\"blogger.com\",\n\t\t\"instagram.com\",\n\t\t\"linkedin.com\",\n\t\t\"en.wikipedia.org\",\n\t\t\"cloudflare.com\",\n\t\t\"wordpress.org\",\n\t}\n\n\tclient := resolvermt.New(resolvers, 3, 10, 5)\n\tdefer client.Close()\n\n\tresults := client.Resolve(domains, resolvermt.TypeA)\n\n\tfor _, record := range results {\n\t\tfmt.Printf(\"%s %s %s\\n\", record.Question, record.Type, record.Answer)\n\t}\n}\n```\n\nOutput:\n\n```\nwww.google.com A 172.217.13.164\nuber.com A 104.36.195.150\nfacebook.com A 31.13.67.35\napple.com A 17.253.144.10\ninstagram.com A 34.226.174.41\ninstagram.com A 54.86.160.135\ninstagram.com A 54.210.252.14\ninstagram.com A 52.87.69.127\ninstagram.com A 54.205.161.210\ninstagram.com A 54.174.36.241\ninstagram.com A 54.165.128.247\ninstagram.com A 3.208.131.236\nblogger.com A 172.217.165.41\ncloudflare.com A 104.16.132.229\ncloudflare.com A 104.16.133.229\nlinkedin.com A 13.107.42.14\nen.wikipedia.org CNAME dyna.wikimedia.org\nen.wikipedia.org A 208.80.154.224\nwordpress.org A 198.143.164.252\n```\n\nIn its current implementation, the client will create at least one or more sockets per resolver to send and receive DNS queries. As each socket uses an open file descriptor, it is easy to hit the limit of open file descriptors in the OS. If this happens, the client will handle the failed connections but the performance may suffer with a large number of resolvers and threads. If you are trying to run a large number of requests concurrently (100+), increase the limit with `ulimit -n 102400`. A future version may change the way queries are made to prevent this.\n\n[doc-img]: https://pkg.go.dev/badge/github.com/d3mondev/resolvermt\n[doc]: https://pkg.go.dev/github.com/d3mondev/resolvermt\n[cov-img]: https://codecov.io/gh/d3mondev/resolvermt/branch/master/graph/badge.svg?token=3D1I4J6YA2\n[cov]: https://codecov.io/gh/d3mondev/resolvermt\n[test-img]: https://github.com/d3mondev/resolvermt/workflows/test/badge.svg\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd3mondev%2Fresolvermt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd3mondev%2Fresolvermt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd3mondev%2Fresolvermt/lists"}