{"id":36858868,"url":"https://github.com/pabateman/dns-lookuper","last_synced_at":"2026-01-12T14:48:19.366Z","repository":{"id":212126774,"uuid":"728335201","full_name":"pabateman/dns-lookuper","owner":"pabateman","description":"Lookup domain names from file","archived":false,"fork":false,"pushed_at":"2025-06-04T07:04:47.000Z","size":116,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-04T13:56:22.948Z","etag":null,"topics":["dns","dns-lookup","dns-lookups","dnslookup","dnslookups","lookup","network","resolvers"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pabateman.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2023-12-06T18:08:42.000Z","updated_at":"2025-06-04T07:04:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"1fa31f22-2ee4-451d-8263-0fd723b59552","html_url":"https://github.com/pabateman/dns-lookuper","commit_stats":null,"previous_names":["pabateman/dns-lookuper"],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/pabateman/dns-lookuper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pabateman%2Fdns-lookuper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pabateman%2Fdns-lookuper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pabateman%2Fdns-lookuper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pabateman%2Fdns-lookuper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pabateman","download_url":"https://codeload.github.com/pabateman/dns-lookuper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pabateman%2Fdns-lookuper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28340410,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","dns-lookup","dns-lookups","dnslookup","dnslookups","lookup","network","resolvers"],"created_at":"2026-01-12T14:48:18.920Z","updated_at":"2026-01-12T14:48:19.355Z","avatar_url":"https://github.com/pabateman.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DNS Lookuper\n\nDNS Lookuper is a simple utility that resolves your list of domain names into their addresses. It supports several output formats such as `yaml`, `json`, `csv`, and custom templates.\n\n## Installation\n\nSee the following artifacts:\n\n- [Releases](https://github.com/pabateman/dns-lookuper/releases)\n- [Docker Hub Images](https://hub.docker.com/repository/docker/pabateman/dns-lookuper/general)\n\n### Example for Linux AMD64\n\n#### Binary\n\n```bash\ncurl -Lo dns-lookuper https://github.com/pabateman/dns-lookuper/releases/latest/download/dns-lookuper-linux-amd64\nchmod +x dns-lookuper\nmv dns-lookuper /usr/local/bin\n```\n\n#### Docker\n\n```bash\nVERSION=$(curl -sL https://api.github.com/repos/pabateman/dns-lookuper/releases/latest | grep tag_name | cut -d '\"' -f 4)\ndocker pull pabateman/dns-lookuper:${VERSION}\n```\n\n## Usage\n\nLookuper works with command line arguments as well as a configuration file.\n\nThe utility uses the concept of tasks. You can configure only one task through the command line, whereas through a configuration file, you can configure multiple tasks.\n\n### Command line\n\nExample with command line:\n\n```bash\n$ dns-lookuper -f ./testdata/lists/1.lst -f ./testdata/lists/2.lst -o - -m all -r hosts\n```\n\nConsole output:\n\n```hosts\ncloudflare.com 104.16.133.229\ncloudflare.com 104.16.132.229\ncloudflare.com 2606:4700::6810:84e5\ncloudflare.com 2606:4700::6810:85e5\ngoogle.com 173.194.220.138\ngoogle.com 173.194.220.102\ngoogle.com 173.194.220.100\ngoogle.com 173.194.220.101\ngoogle.com 173.194.220.113\ngoogle.com 173.194.220.139\ngoogle.com 2a00:1450:4010:c0e::8b\ngoogle.com 2a00:1450:4010:c0e::66\ngoogle.com 2a00:1450:4010:c0e::71\ngoogle.com 2a00:1450:4010:c0e::64\nhashicorp.com 76.76.21.21\nlinked.in 108.174.10.24\nlinked.in 2620:109:c002::6cae:a18\nreleases.hashicorp.com 108.157.229.119\nrpm.releases.hashicorp.com 3.164.230.2\nrpm.releases.hashicorp.com 3.164.230.117\nrpm.releases.hashicorp.com 3.164.230.48\nrpm.releases.hashicorp.com 3.164.230.56\nrpm.releases.hashicorp.com 2600:9000:25f7:d200:18:566b:ecc0:93a1\nrpm.releases.hashicorp.com 2600:9000:25f7:a400:18:566b:ecc0:93a1\nrpm.releases.hashicorp.com 2600:9000:25f7:ca00:18:566b:ecc0:93a1\nrpm.releases.hashicorp.com 2600:9000:25f7:8c00:18:566b:ecc0:93a1\nrpm.releases.hashicorp.com 2600:9000:25f7:0:18:566b:ecc0:93a1\nrpm.releases.hashicorp.com 2600:9000:25f7:6e00:18:566b:ecc0:93a1\nrpm.releases.hashicorp.com 2600:9000:25f7:9000:18:566b:ecc0:93a1\nrpm.releases.hashicorp.com 2600:9000:25f7:8200:18:566b:ecc0:93a1\nterraform.io 76.76.21.21\n```\n\n### Configuration file\n\nFirst, you need a config file:\n\n```yaml\ntasks:\n  - files:\n      - ./../lists/1.lst\n      - ./../lists/2.lst\n    output: \"-\"\n    format: list\n    mode: ipv4\n  - files:\n      - ./../lists/1.lst\n      - ./../lists/2.lst\n    output: result_ipv6.txt\n    format: list\n    mode: ipv6\n```\n\nThis example stored in [testdata/configs/many.yaml](/testdata/configs/many.yaml).\n\n```bash\n$ dns-lookuper -c testdata/configs/many.yaml\n```\n\nThe result of the execution will be console output:\n\n```list\n104.16.132.229\n104.16.133.229\n108.157.229.119\n108.174.10.24\n173.194.222.100\n173.194.222.101\n173.194.222.102\n173.194.222.113\n173.194.222.138\n173.194.222.139\n18.165.140.122\n18.165.140.50\n18.165.140.52\n18.165.140.56\n76.76.21.21\n```\n\nAdditionally, a file will be stored in testdata/output/result_ipv6.txt with the following content:\n\n```list\n2600:9000:272c:3000:18:566b:ecc0:93a1\n2600:9000:272c:4400:18:566b:ecc0:93a1\n2600:9000:272c:4600:18:566b:ecc0:93a1\n2600:9000:272c:4c00:18:566b:ecc0:93a1\n2600:9000:272c:d200:18:566b:ecc0:93a1\n2600:9000:272c:d600:18:566b:ecc0:93a1\n2600:9000:272c:da00:18:566b:ecc0:93a1\n2600:9000:272c:fc00:18:566b:ecc0:93a1\n2606:4700::6810:84e5\n2606:4700::6810:85e5\n2620:109:c002::6cae:a18\n2a00:1450:4010:c03::64\n2a00:1450:4010:c03::65\n2a00:1450:4010:c03::71\n2a00:1450:4010:c03::8b\n```\n\n**Important notice:** with the configuration file, only one task is allowed to print to the console (`/dev/stdout` or `/dev/stderr`) by design purposes.\n\n### Daemon mode\n\nDNS Lookuper supports a daemon mode, in which the utility executes continuously at a specified interval (1 minute by default). The interval must be specified in Go duration format, e.g., 30s, 5m, 3h, 1d, 5y. Similar to oneshot mode, there is support for command line options or a configuration file.\n\n**Important notice:** Daemon mode not supports console output (`/dev/stdout` or `/dev/stderr`) by design purposes.\n\nExample with command line:\n\n```bash\n$ dns-lookuper -f ./testdata/lists/1.lst -f ./testdata/lists/2.lst -o testdata/output/result.txt -m all -r hosts -d -i 10s\n```\n\nAs result of the execution a file will be stored in testdata/output/result.txt and it will be updated every 10 seconds.\n\nExample with config file:\n\nConfig file:\n\n```yaml\nsettings:\n  lookupTimeout: 2\n  daemon:\n    enabled: true\n    interval: 30s\ntasks:\n  - files:\n      - ../lists/1.lst\n      - ../lists/2.lst\n    output: ../output/daemonconfig.txt\n    format: yaml\n\n```\n\nStored in [testdata/configs/simple-daemon.yaml](/testdata/configs/simple-daemon.yaml).\n\nTry it:\n\n```bash\n$ dns-lookuper -c testdata/configs/simple-daemon.yaml\n```\n\nAs result of the execution a file will be stored in testdata/output/daemonconfig.txt and it will be updated every 30 seconds.\n\n## Output formats\n\nDNS Lookuper supports several output formats, including:\n\n- Simple list\n- Hosts file\n- JSON\n- YAML\n- CSV\n- Template\n\n### Simple list\n\nJust simple list of IP addresses, example:\n\n```bash\n$ dns-lookuper -f testdata/lists/1.lst -r list\n```\n\nOutput:\n\n```list\n104.16.132.229\n104.16.133.229\n2606:4700::6810:84e5\n2606:4700::6810:85e5\n76.76.21.21\n```\n\n### Hosts file\n\nClassic `/etc/hosts` format, example:\n\n```bash\n$ dns-lookuper -f testdata/lists/1.lst -r hosts\n```\n\nOutput:\n\n```hosts\n104.16.133.229 cloudflare.com\n104.16.132.229 cloudflare.com\n2606:4700::6810:84e5 cloudflare.com\n2606:4700::6810:85e5 cloudflare.com\n76.76.21.21 hashicorp.com\n76.76.21.21 terraform.io\n```\n\n### JSON\n\nA list of objects with the name as a string and adresses as a list:\n\n```bash\n$ dns-lookuper -f testdata/lists/1.lst -r json\n```\n\nOutput:\n\n```json\n[\n  {\n    \"name\": \"cloudflare.com\",\n    \"addresses\": [\n      \"104.16.132.229\",\n      \"104.16.133.229\",\n      \"2606:4700::6810:84e5\",\n      \"2606:4700::6810:85e5\"\n    ]\n  },\n  {\n    \"name\": \"hashicorp.com\",\n    \"addresses\": [\n      \"76.76.21.21\"\n    ]\n  },\n  {\n    \"name\": \"terraform.io\",\n    \"addresses\": [\n      \"76.76.21.21\"\n    ]\n  }\n```\n\n### YAML\n\nSimilar to JSON, but YAML:\n\n```bash\n$ dns-lookuper -f testdata/lists/1.lst -r json\n```\n\nOutput:\n\n```yaml\n- addresses:\n  - 104.16.133.229\n  - 104.16.132.229\n  - 2606:4700::6810:84e5\n  - 2606:4700::6810:85e5\n  name: cloudflare.com\n- addresses:\n  - 76.76.21.21\n  name: hashicorp.com\n- addresses:\n  - 76.76.21.21\n  name: terraform.io\n```\n\n### CSV\n\nA simple CSV file:\n\n```bash\n$ dns-lookuper -f testdata/lists/1.lst -r csv\n```\n\nOutput:\n\n```csv\nname,address\ncloudflare.com,104.16.132.229\ncloudflare.com,104.16.133.229\ncloudflare.com,2606:4700::6810:85e5\ncloudflare.com,2606:4700::6810:84e5\nhashicorp.com,76.76.21.21\nterraform.io,76.76.21.21\n```\n\n### Template\n\nAdditionally, you can specify your own template for the lookup result for every task separately. You can also specify a header (i.e., the first line) and a footer (i.e., the last line) for the template. The only available variables are `{{host}}` for the host and `{{address}}` for addresses, and these variables are available only for the body of the template..\n\n```bash\n$ dns-lookuper -f testdata/lists/1.lst -r template -t \"there is {{host}} with address {{address}}\" --template-header \"hello from the header of the template\" --template-footer \"hello from the footer of the template\"\n```\n\nOutput:\n\n```text\nhello from the header of the template\nthere is cloudflare.com with address 104.16.133.229\nthere is cloudflare.com with address 104.16.132.229\nthere is cloudflare.com with address 2606:4700::6810:84e5\nthere is cloudflare.com with address 2606:4700::6810:85e5\nthere is hashicorp.com with address 76.76.21.21\nthere is terraform.io with address 76.76.21.21\nhello from the footer of the template\n```\n\nAnother example for the config file stored in [testdata/config/template.yaml](/testdata/config/template.yaml):\n\n```yaml\ntasks:\n  - files:\n      - ../lists/1.lst\n      - ../lists/2.lst\n    output: '-'\n    format: template\n    mode: ipv4\n    template:\n      header: |\n        welcome to my awesome resolved list header\n        it can be multiline\n      text: \"here is {{host}} with address {{address}}\"\n      footer: |\n        welcome to my awesome resolved list footer\n        it can be multiline as well\n        byebye!\n```\n\n```bash\n$ dns-lookuper -c testdata/configs/template.yaml\n```\n\n```text\nwelcome to my awesome resolved list header\nit can be multiline\n\nhere is cloudflare.com with address 104.16.133.229\nhere is cloudflare.com with address 104.16.132.229\nhere is google.com with address 142.250.150.138\nhere is google.com with address 142.250.150.113\nhere is google.com with address 142.250.150.102\nhere is google.com with address 142.250.150.100\nhere is google.com with address 142.250.150.101\nhere is google.com with address 142.250.150.139\nhere is hashicorp.com with address 76.76.21.21\nhere is linked.in with address 108.174.10.24\nhere is rpm.releases.hashicorp.com with address 52.222.214.72\nhere is rpm.releases.hashicorp.com with address 52.222.214.58\nhere is rpm.releases.hashicorp.com with address 52.222.214.125\nhere is rpm.releases.hashicorp.com with address 52.222.214.123\nhere is terraform.io with address 76.76.21.21\nwelcome to my awesome resolved list footer\nit can be multiline as well\nbyebye!\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpabateman%2Fdns-lookuper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpabateman%2Fdns-lookuper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpabateman%2Fdns-lookuper/lists"}