{"id":13541167,"url":"https://github.com/dead10ck/nu_plugin_dns","last_synced_at":"2025-04-09T07:09:34.977Z","repository":{"id":183298487,"uuid":"669903335","full_name":"dead10ck/nu_plugin_dns","owner":"dead10ck","description":"DNS utility for nushell","archived":false,"fork":false,"pushed_at":"2025-03-06T22:33:39.000Z","size":330,"stargazers_count":33,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-05T00:33:05.190Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dead10ck.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-23T20:00:30.000Z","updated_at":"2025-03-13T21:59:52.000Z","dependencies_parsed_at":"2024-02-09T00:55:05.219Z","dependency_job_id":"f7356cfc-b2b1-4723-bfd5-f4fe75ae4619","html_url":"https://github.com/dead10ck/nu_plugin_dns","commit_stats":{"total_commits":124,"total_committers":2,"mean_commits":62.0,"dds":0.008064516129032251,"last_synced_commit":"0453d9adbbadc00e4ff22261cf464d10ea4a4ccc"},"previous_names":["dead10ck/nu_plugin_dns"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dead10ck%2Fnu_plugin_dns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dead10ck%2Fnu_plugin_dns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dead10ck%2Fnu_plugin_dns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dead10ck%2Fnu_plugin_dns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dead10ck","download_url":"https://codeload.github.com/dead10ck/nu_plugin_dns/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247994122,"owners_count":21030050,"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":[],"created_at":"2024-08-01T10:00:39.991Z","updated_at":"2025-04-09T07:09:34.961Z","avatar_url":"https://github.com/dead10ck.png","language":"Rust","readme":"# `nu_plugin_dns`\n\n[Nushell](http://www.nushell.sh/) plugin that does DNS queries  and parses\nresults into meaningful types. Intended to be a native replacement for\n[`dig`](https://en.m.wikipedia.org/wiki/Dig_(command)). Uses the excellent\n[`hickory`](https://github.com/hickory-dns/hickory-dns) crates.\n\n## Usage\n\n* All queries by default attempt to validate records with DNSSEC. If records\n  do not have DNSSEC or the nameserver does not support it, then by default, it\n  falls back to plain queries. This behavior can be tuned with the `--dnssec`\n  flag.\n* Supported protocols are UDP, TCP, TLS, HTTPS, and QUIC\n* If no nameserver address is specified, the system's DNS config is used, or if\n  none is available, falls back to Google.\n\n### Examples\n\n```\nsimple query for A / AAAA records\n\u003e dns query amazon.com\n\n╭─#─┬───────────────header───────────────┬────────question─────────┬────────────────────────────answer─────────────────────────────┬──────────────────────────────────────────authority───────────────────────────────────────────┬───additional───┬────────────────edns─────────────────┬─size──╮\n│ 0 │ ╭─────────────────────┬──────────╮ │ ╭───────┬─────────────╮ │ ╭─#─┬────name─────┬type┬class┬────ttl─────┬──────rdata──────╮ │ [list 0 items]                                                                               │ [list 0 items] │ ╭─────────────┬───────────────────╮ │  87 B │\n│   │ │ id                  │ 26694    │ │ │ name  │ amazon.com. │ │ │ 0 │ amazon.com. │ A  │ IN  │ 3min 35sec │ 54.239.28.85    │ │                                                                                              │                │ │ rcode_high  │ 0                 │ │       │\n│   │ │ message_type        │ RESPONSE │ │ │ type  │ A           │ │ │ 1 │ amazon.com. │ A  │ IN  │ 3min 35sec │ 52.94.236.248   │ │                                                                                              │                │ │ version     │ 0                 │ │       │\n│   │ │ op_code             │ QUERY    │ │ │ class │ IN          │ │ │ 2 │ amazon.com. │ A  │ IN  │ 3min 35sec │ 205.251.242.103 │ │                                                                                              │                │ │ dnssec_ok   │ false             │ │       │\n│   │ │ authoritative       │ false    │ │ ╰───────┴─────────────╯ │ ╰───┴─────────────┴────┴─────┴────────────┴─────────────────╯ │                                                                                              │                │ │ max_payload │ 512 B             │ │       │\n│   │ │ truncated           │ false    │ │                         │                                                               │                                                                                              │                │ │ opts        │ {record 0 fields} │ │       │\n│   │ │ recursion_desired   │ true     │ │                         │                                                               │                                                                                              │                │ ╰─────────────┴───────────────────╯ │       │\n│   │ │ recursion_available │ true     │ │                         │                                                               │                                                                                              │                │                                     │       │\n│   │ │ authentic_data      │ false    │ │                         │                                                               │                                                                                              │                │                                     │       │\n│   │ │ response_code       │ No Error │ │                         │                                                               │                                                                                              │                │                                     │       │\n│   │ │ query_count         │ 1        │ │                         │                                                               │                                                                                              │                │                                     │       │\n│   │ │ answer_count        │ 3        │ │                         │                                                               │                                                                                              │                │                                     │       │\n│   │ │ name_server_count   │ 0        │ │                         │                                                               │                                                                                              │                │                                     │       │\n│   │ │ additional_count    │ 1        │ │                         │                                                               │                                                                                              │                │                                     │       │\n│   │ ╰─────────────────────┴──────────╯ │                         │                                                               │                                                                                              │                │                                     │       │\n│ 1 │ ╭─────────────────────┬──────────╮ │ ╭───────┬─────────────╮ │ [list 0 items]                                                │ ╭─#─┬────name─────┬type─┬class┬────ttl─────┬─────────────────────rdata─────────────────────╮ │ [list 0 items] │ ╭─────────────┬───────────────────╮ │ 106 B │\n│   │ │ id                  │ 43590    │ │ │ name  │ amazon.com. │ │                                                               │ │ 0 │ amazon.com. │ SOA │ IN  │ 1min 34sec │ ╭─────────┬─────────────────────────────────╮ │ │                │ │ rcode_high  │ 0                 │ │       │\n│   │ │ message_type        │ RESPONSE │ │ │ type  │ AAAA        │ │                                                               │ │   │             │     │     │            │ │ mname   │ dns-external-master.amazon.com. │ │ │                │ │ version     │ 0                 │ │       │\n│   │ │ op_code             │ QUERY    │ │ │ class │ IN          │ │                                                               │ │   │             │     │     │            │ │ rname   │ hostmaster.amazon.com.          │ │ │                │ │ dnssec_ok   │ false             │ │       │\n│   │ │ authoritative       │ false    │ │ ╰───────┴─────────────╯ │                                                               │ │   │             │     │     │            │ │ serial  │ 2010185872                      │ │ │                │ │ max_payload │ 512 B             │ │       │\n│   │ │ truncated           │ false    │ │                         │                                                               │ │   │             │     │     │            │ │ refresh │ 3min                            │ │ │                │ │ opts        │ {record 0 fields} │ │       │\n│   │ │ recursion_desired   │ true     │ │                         │                                                               │ │   │             │     │     │            │ │ retry   │ 1min                            │ │ │                │ ╰─────────────┴───────────────────╯ │       │\n│   │ │ recursion_available │ true     │ │                         │                                                               │ │   │             │     │     │            │ │ expire  │ 1wk                             │ │ │                │                                     │       │\n│   │ │ authentic_data      │ false    │ │                         │                                                               │ │   │             │     │     │            │ │ minimum │ 15min                           │ │ │                │                                     │       │\n│   │ │ response_code       │ No Error │ │                         │                                                               │ │   │             │     │     │            │ ╰─────────┴─────────────────────────────────╯ │ │                │                                     │       │\n│   │ │ query_count         │ 1        │ │                         │                                                               │ ╰───┴─────────────┴─────┴─────┴────────────┴───────────────────────────────────────────────╯ │                │                                     │       │\n│   │ │ answer_count        │ 0        │ │                         │                                                               │                                                                                              │                │                                     │       │\n│   │ │ name_server_count   │ 1        │ │                         │                                                               │                                                                                              │                │                                     │       │\n│   │ │ additional_count    │ 1        │ │                         │                                                               │                                                                                              │                │                                     │       │\n│   │ ╰─────────────────────┴──────────╯ │                         │                                                               │                                                                                              │                │                                     │       │\n╰───┴────────────────────────────────────┴─────────────────────────┴───────────────────────────────────────────────────────────────┴──────────────────────────────────────────────────────────────────────────────────────────────┴────────────────┴─────────────────────────────────────┴───────╯\n```\n\n```\nspecify query type\n\u003e dns query --type CNAME en.wikipedia.org\n\n╭─#─┬───────────────header───────────────┬───────────question────────────┬─────────────────────────────────────answer──────────────────────────────────────┬───authority────┬───additional───┬────────────────edns─────────────────┬─size─╮\n│ 0 │ ╭─────────────────────┬──────────╮ │ ╭───────┬───────────────────╮ │ ╭─#─┬───────name────────┬─type──┬class┬───────ttl───────┬────────rdata────────╮ │ [list 0 items] │ [list 0 items] │ ╭─────────────┬───────────────────╮ │ 74 B │\n│   │ │ id                  │ 40068    │ │ │ name  │ en.wikipedia.org. │ │ │ 0 │ en.wikipedia.org. │ CNAME │ IN  │ 4hr 26min 40sec │ dyna.wikimedia.org. │ │                │                │ │ rcode_high  │ 0                 │ │      │\n│   │ │ message_type        │ RESPONSE │ │ │ type  │ CNAME             │ │ ╰───┴───────────────────┴───────┴─────┴─────────────────┴─────────────────────╯ │                │                │ │ version     │ 0                 │ │      │\n│   │ │ op_code             │ QUERY    │ │ │ class │ IN                │ │                                                                                 │                │                │ │ dnssec_ok   │ false             │ │      │\n│   │ │ authoritative       │ false    │ │ ╰───────┴───────────────────╯ │                                                                                 │                │                │ │ max_payload │ 512 B             │ │      │\n│   │ │ truncated           │ false    │ │                               │                                                                                 │                │                │ │ opts        │ {record 0 fields} │ │      │\n│   │ │ recursion_desired   │ true     │ │                               │                                                                                 │                │                │ ╰─────────────┴───────────────────╯ │      │\n│   │ │ recursion_available │ true     │ │                               │                                                                                 │                │                │                                     │      │\n│   │ │ authentic_data      │ false    │ │                               │                                                                                 │                │                │                                     │      │\n│   │ │ response_code       │ No Error │ │                               │                                                                                 │                │                │                                     │      │\n│   │ │ query_count         │ 1        │ │                               │                                                                                 │                │                │                                     │      │\n│   │ │ answer_count        │ 1        │ │                               │                                                                                 │                │                │                                     │      │\n│   │ │ name_server_count   │ 0        │ │                               │                                                                                 │                │                │                                     │      │\n│   │ │ additional_count    │ 1        │ │                               │                                                                                 │                │                │                                     │      │\n│   │ ╰─────────────────────┴──────────╯ │                               │                                                                                 │                │                │                                     │      │\n╰───┴────────────────────────────────────┴───────────────────────────────┴─────────────────────────────────────────────────────────────────────────────────┴────────────────┴────────────────┴─────────────────────────────────────┴──────╯\n```\n\n```\nspecify query types by numeric ID, and get numeric IDs in output\n\u003e dns query --type [5, 15] -c google.com\n\n╭─#─┬────────────────────header─────────────────────┬───────────question───────────┬─────────────────────────────────────────────answer──────────────────────────────────────────────┬─────────────────────────────────────────────authority─────────────────────────────────────────────┬───additional───┬────────────────edns─────────────────┬─size─╮\n│ 0 │ ╭─────────────────────┬─────────────────────╮ │ ╭───────┬───────────────╮    │ ╭─#─┬────name─────┬─────type──────┬─────class─────┬──ttl──┬───────────────rdata───────────────╮ │ [list 0 items]                                                                                    │ [list 0 items] │ ╭─────────────┬───────────────────╮ │ 60 B │\n│   │ │ id                  │ 25259               │ │ │ name  │ google.com.   │    │ │ 0 │ google.com. │ ╭──────┬────╮ │ ╭──────┬────╮ │ 53sec │ ╭────────────┬──────────────────╮ │ │                                                                                                   │                │ │ rcode_high  │ 0                 │ │      │\n│   │ │                     │ ╭──────┬──────────╮ │ │ │       │ ╭──────┬────╮ │    │ │   │             │ │ name │ MX │ │ │ name │ IN │ │       │ │ preference │ 10               │ │ │                                                                                                   │                │ │ version     │ 0                 │ │      │\n│   │ │ message_type        │ │ name │ RESPONSE │ │ │ │ type  │ │ name │ MX │ │    │ │   │             │ │ code │ 15 │ │ │ code │ 1  │ │       │ │ exchange   │ smtp.google.com. │ │ │                                                                                                   │                │ │ dnssec_ok   │ false             │ │      │\n│   │ │                     │ │ code │ 1        │ │ │ │       │ │ code │ 15 │ │    │ │   │             │ ╰──────┴────╯ │ ╰──────┴────╯ │       │ ╰────────────┴──────────────────╯ │ │                                                                                                   │                │ │ max_payload │ 512 B             │ │      │\n│   │ │                     │ ╰──────┴──────────╯ │ │ │       │ ╰──────┴────╯ │    │ ╰───┴─────────────┴───────────────┴───────────────┴───────┴───────────────────────────────────╯ │                                                                                                   │                │ │ opts        │ {record 0 fields} │ │      │\n│   │ │                     │ ╭──────┬───────╮    │ │ │       │ ╭──────┬────╮ │    │                                                                                                 │                                                                                                   │                │ ╰─────────────┴───────────────────╯ │      │\n│   │ │ op_code             │ │ name │ QUERY │    │ │ │ class │ │ name │ IN │ │    │                                                                                                 │                                                                                                   │                │                                     │      │\n│   │ │                     │ │ code │ 0     │    │ │ │       │ │ code │ 1  │ │    │                                                                                                 │                                                                                                   │                │                                     │      │\n│   │ │                     │ ╰──────┴───────╯    │ │ │       │ ╰──────┴────╯ │    │                                                                                                 │                                                                                                   │                │                                     │      │\n│   │ │ authoritative       │ false               │ │ ╰───────┴───────────────╯    │                                                                                                 │                                                                                                   │                │                                     │      │\n│   │ │ truncated           │ false               │ │                              │                                                                                                 │                                                                                                   │                │                                     │      │\n│   │ │ recursion_desired   │ true                │ │                              │                                                                                                 │                                                                                                   │                │                                     │      │\n│   │ │ recursion_available │ true                │ │                              │                                                                                                 │                                                                                                   │                │                                     │      │\n│   │ │ authentic_data      │ false               │ │                              │                                                                                                 │                                                                                                   │                │                                     │      │\n│   │ │                     │ ╭──────┬──────────╮ │ │                              │                                                                                                 │                                                                                                   │                │                                     │      │\n│   │ │ response_code       │ │ name │ No Error │ │ │                              │                                                                                                 │                                                                                                   │                │                                     │      │\n│   │ │                     │ │ code │ 0        │ │ │                              │                                                                                                 │                                                                                                   │                │                                     │      │\n│   │ │                     │ ╰──────┴──────────╯ │ │                              │                                                                                                 │                                                                                                   │                │                                     │      │\n│   │ │ query_count         │ 1                   │ │                              │                                                                                                 │                                                                                                   │                │                                     │      │\n│   │ │ answer_count        │ 1                   │ │                              │                                                                                                 │                                                                                                   │                │                                     │      │\n│   │ │ name_server_count   │ 0                   │ │                              │                                                                                                 │                                                                                                   │                │                                     │      │\n│   │ │ additional_count    │ 1                   │ │                              │                                                                                                 │                                                                                                   │                │                                     │      │\n│   │ ╰─────────────────────┴─────────────────────╯ │                              │                                                                                                 │                                                                                                   │                │                                     │      │\n│ 1 │ ╭─────────────────────┬─────────────────────╮ │ ╭───────┬──────────────────╮ │ [list 0 items]                                                                                  │ ╭─#─┬────name─────┬──────type──────┬─────class─────┬─ttl──┬────────────────rdata────────────────╮ │ [list 0 items] │ ╭─────────────┬───────────────────╮ │ 89 B │\n│   │ │ id                  │ 55673               │ │ │ name  │ google.com.      │ │                                                                                                 │ │ 0 │ google.com. │ ╭──────┬─────╮ │ ╭──────┬────╮ │ 1min │ ╭─────────┬───────────────────────╮ │ │                │ │ rcode_high  │ 0                 │ │      │\n│   │ │                     │ ╭──────┬──────────╮ │ │ │       │ ╭──────┬───────╮ │ │                                                                                                 │ │   │             │ │ name │ SOA │ │ │ name │ IN │ │      │ │ mname   │ ns1.google.com.       │ │ │                │ │ version     │ 0                 │ │      │\n│   │ │ message_type        │ │ name │ RESPONSE │ │ │ │ type  │ │ name │ CNAME │ │ │                                                                                                 │ │   │             │ │ code │ 6   │ │ │ code │ 1  │ │      │ │ rname   │ dns-admin.google.com. │ │ │                │ │ dnssec_ok   │ false             │ │      │\n│   │ │                     │ │ code │ 1        │ │ │ │       │ │ code │ 5     │ │ │                                                                                                 │ │   │             │ ╰──────┴─────╯ │ ╰──────┴────╯ │      │ │ serial  │ 629673961             │ │ │                │ │ max_payload │ 512 B             │ │      │\n│   │ │                     │ ╰──────┴──────────╯ │ │ │       │ ╰──────┴───────╯ │ │                                                                                                 │ │   │             │                │               │      │ │ refresh │ 15min                 │ │ │                │ │ opts        │ {record 0 fields} │ │      │\n│   │ │                     │ ╭──────┬───────╮    │ │ │       │ ╭──────┬────╮    │ │                                                                                                 │ │   │             │                │               │      │ │ retry   │ 15min                 │ │ │                │ ╰─────────────┴───────────────────╯ │      │\n│   │ │ op_code             │ │ name │ QUERY │    │ │ │ class │ │ name │ IN │    │ │                                                                                                 │ │   │             │                │               │      │ │ expire  │ 30min                 │ │ │                │                                     │      │\n│   │ │                     │ │ code │ 0     │    │ │ │       │ │ code │ 1  │    │ │                                                                                                 │ │   │             │                │               │      │ │ minimum │ 1min                  │ │ │                │                                     │      │\n│   │ │                     │ ╰──────┴───────╯    │ │ │       │ ╰──────┴────╯    │ │                                                                                                 │ │   │             │                │               │      │ ╰─────────┴───────────────────────╯ │ │                │                                     │      │\n│   │ │ authoritative       │ false               │ │ ╰───────┴──────────────────╯ │                                                                                                 │ ╰───┴─────────────┴────────────────┴───────────────┴──────┴─────────────────────────────────────╯ │                │                                     │      │\n│   │ │ truncated           │ false               │ │                              │                                                                                                 │                                                                                                   │                │                                     │      │\n│   │ │ recursion_desired   │ true                │ │                              │                                                                                                 │                                                                                                   │                │                                     │      │\n│   │ │ recursion_available │ true                │ │                              │                                                                                                 │                                                                                                   │                │                                     │      │\n│   │ │ authentic_data      │ false               │ │                              │                                                                                                 │                                                                                                   │                │                                     │      │\n│   │ │                     │ ╭──────┬──────────╮ │ │                              │                                                                                                 │                                                                                                   │                │                                     │      │\n│   │ │ response_code       │ │ name │ No Error │ │ │                              │                                                                                                 │                                                                                                   │                │                                     │      │\n│   │ │                     │ │ code │ 0        │ │ │                              │                                                                                                 │                                                                                                   │                │                                     │      │\n│   │ │                     │ ╰──────┴──────────╯ │ │                              │                                                                                                 │                                                                                                   │                │                                     │      │\n│   │ │ query_count         │ 1                   │ │                              │                                                                                                 │                                                                                                   │                │                                     │      │\n│   │ │ answer_count        │ 0                   │ │                              │                                                                                                 │                                                                                                   │                │                                     │      │\n│   │ │ name_server_count   │ 1                   │ │                              │                                                                                                 │                                                                                                   │                │                                     │      │\n│   │ │ additional_count    │ 1                   │ │                              │                                                                                                 │                                                                                                   │                │                                     │      │\n│   │ ╰─────────────────────┴─────────────────────╯ │                              │                                                                                                 │                                                                                                   │                │                                     │      │\n╰───┴───────────────────────────────────────────────┴──────────────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────┴───────────────────────────────────────────────────────────────────────────────────────────────────┴────────────────┴─────────────────────────────────────┴──────╯\n```\n\n```\npipe name into command\n\u003e 'google.com' | dns query\n```\n\n```\npipe lists of names into command\n\u003e ['google.com', 'amazon.com'] | dns query\n```\n\n```\nquery record name that has labels with non-renderable bytes\n\u003e [ $\"ding(char -u '07')-ds\", \"metric\", \"gstatic\", \"com\" ] | each { into binary } | collect { $in } | dns query\n```\n\n```\npipe table of queries into command (ignores --type flag)\n\u003e [{name: 'google.com', type: 'A'}, {name: 'amazon.com', type: 'A'}] | dns query\n```\n\n```\nchoose a different protocol and/or port\n\u003e dns query -p tls -n dns.google -s 8.8.8.8 en.wikipedia.org\n\u003e dns query -p https -n cloudflare-dns.com -s 1.1.1.1 en.wikipedia.org\n\u003e dns query -p quic -n dns.adguard-dns.com -s 94.140.15.15:853 en.wikipedia.org\n```\n\n## Configuration\n\nYou can specify any of the command line flags in your `config.nu` to make them\npermanent. If an option is specified in both the `config.nu` and the CLI, the\nCLI takes precedence.\n\n```nu\n$env.config.plugins.dns = {\n  server: \"94.140.15.15\"\n  protocol: https\n  dns-name: dns.adguard-dns.com\n  dnssec-mode: strict\n  tasks: 16\n  timeout: 30sec\n}\n```\n\n## Install\n\n```nu\ncargo install nu_plugin_dns\nplugin add $\"($env.CARGO_HOME)/bin/nu_plugin_dns\"\nplugin use dns\n```\n","funding_links":[],"categories":["Plugins"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdead10ck%2Fnu_plugin_dns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdead10ck%2Fnu_plugin_dns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdead10ck%2Fnu_plugin_dns/lists"}