{"id":19824748,"url":"https://github.com/stephangeorg/node-dig-dns","last_synced_at":"2025-05-01T13:31:37.812Z","repository":{"id":25720067,"uuid":"106332551","full_name":"StephanGeorg/node-dig-dns","owner":"StephanGeorg","description":"Use dig command (domain information grope) for DNS queries in node","archived":false,"fork":false,"pushed_at":"2023-01-08T04:33:51.000Z","size":165,"stargazers_count":37,"open_issues_count":10,"forks_count":21,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-29T09:42:45.045Z","etag":null,"topics":["dig","dns","domain-information-grope","node"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/StephanGeorg.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2017-10-09T20:34:50.000Z","updated_at":"2024-08-26T07:39:35.000Z","dependencies_parsed_at":"2023-01-14T03:16:49.405Z","dependency_job_id":null,"html_url":"https://github.com/StephanGeorg/node-dig-dns","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StephanGeorg%2Fnode-dig-dns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StephanGeorg%2Fnode-dig-dns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StephanGeorg%2Fnode-dig-dns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StephanGeorg%2Fnode-dig-dns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StephanGeorg","download_url":"https://codeload.github.com/StephanGeorg/node-dig-dns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251881703,"owners_count":21659143,"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":["dig","dns","domain-information-grope","node"],"created_at":"2024-11-12T11:05:46.014Z","updated_at":"2025-05-01T13:31:37.524Z","avatar_url":"https://github.com/StephanGeorg.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-dig-dns [![npm version](https://badge.fury.io/js/node-dig-dns.svg)](https://badge.fury.io/js/node-dig-dns)\nUsing native node dns to query complex DNS is a hustle. This is a simple wrapper for the unix/linux/macos dig command (domain information grope). Output is parsed to JSON.\n\n## Install\n```\nnpm i node-dig-dns -S\n```\n\n## Usage\n```\ndig([args], (options))\n```\nYou can add [all args from dig](https://linux.die.net/man/1/dig) to the args array.\n### Examples\n```\ndig(['google.com', 'ANY'])\n  .then((result) =\u003e {\n    console.log(result)\n  })\n  .catch((err) =\u003e {\n    console.log('Error:', err);\n  });\n```\nSet custom DNS server:\n```\ndig(['@8.8.8.4','google.com', 'ANY'])\n  .then((result) =\u003e {\n    console.log(result)\n  })\n  .catch((err) =\u003e {\n    console.log('Error:', err);\n  });\n```\n### Options\nOptional parameters:\n* raw: Get the raw output as string. If +short option, raw output is default\n* dig: Manually set the dig command (/my/custum/path/to/dig)\n\n## Result\n\nThe dig result is parsed and return in JSON:\n```\n{ question: [ [ ';google.com.', 'IN', 'ANY' ] ],\n  answer: \n   [ { domain: 'google.com.',\n       type: 'A',\n       ttl: '268',\n       class: 'IN',\n       value: '216.58.211.110' },\n     { domain: 'google.com.',\n       type: 'AAAA',\n       ttl: '268',\n       class: 'IN',\n       value: '2a00:1450:400e:809::200e' },\n     { domain: 'google.com.',\n       type: 'MX',\n       ttl: '568',\n       class: 'IN',\n       value: '30 alt2.aspmx.l.google.com.' },\n       \n       ...\n       \n    ],         \n  time: 41,\n  server: '8.8.8.8#53(8.8.8.8)',\n  datetime: 'Mon Oct  9 23:56:37 2017',\n  size: 373 }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephangeorg%2Fnode-dig-dns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstephangeorg%2Fnode-dig-dns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephangeorg%2Fnode-dig-dns/lists"}