{"id":21464226,"url":"https://github.com/shuque/pydig","last_synced_at":"2026-02-25T09:31:47.689Z","repository":{"id":2141004,"uuid":"3085115","full_name":"shuque/pydig","owner":"shuque","description":"pydig: a DNS query tool written in Python","archived":false,"fork":false,"pushed_at":"2025-05-24T11:33:13.000Z","size":279,"stargazers_count":104,"open_issues_count":0,"forks_count":29,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-07-15T06:01:15.424Z","etag":null,"topics":["client","debugging","dig","dns","prototyping","tool"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shuque.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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":"2012-01-02T01:49:34.000Z","updated_at":"2025-05-24T11:32:57.000Z","dependencies_parsed_at":"2024-02-04T17:46:59.511Z","dependency_job_id":"4c73d5ea-9d19-480c-9275-9ce423347017","html_url":"https://github.com/shuque/pydig","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/shuque/pydig","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuque%2Fpydig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuque%2Fpydig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuque%2Fpydig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuque%2Fpydig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shuque","download_url":"https://codeload.github.com/shuque/pydig/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuque%2Fpydig/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29816020,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T05:36:42.804Z","status":"ssl_error","status_checked_at":"2026-02-25T05:36:31.934Z","response_time":61,"last_error":"SSL_read: 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":["client","debugging","dig","dns","prototyping","tool"],"created_at":"2024-11-23T07:30:22.563Z","updated_at":"2026-02-25T09:31:47.674Z","avatar_url":"https://github.com/shuque.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pydig\n\nProgram:\tpydig (a DNS query tool written in Python)  \nWritten by:\tShumon Huque \u003cshuque@gmail.com\u003e  \n\n## Description\n\npydig is a program to perform DNS queries and exercise various existing\nand emerging features of the DNS protocol. It is roughly modelled after the\ndig program that comes with ISC BIND. I wrote it mostly for fun, and to\nhelp me learn learn some of the more esoteric features of the DNS. Occasionally\nI use it to quickly prototype new and proposed enhancements to the DNS. Some of\nthe more recent such features include EDNS client subnet, chain query, cookies,\nDNS over TLS, EDNS padding, DNS over HTTPS, and more.\n\nRR type and class codes (qtype and qclass) unknown to this program can be\nspecified with the TYPE123 and CLASS123 syntax.\n\n## Usage\n\n```\n$ pydig -h\npydig (a DNS query tool written in Python), version 1.6.7\n\nUsage: pydig [list of options] \u003cqname\u003e [\u003cqtype\u003e] [\u003cqclass\u003e]\n       pydig @server +walk \u003czone\u003e\nOptions:\n        -h                        print program usage information\n        @server                   server to query\n        -pNN                      use port NN (default is port 53)\n        -bIP                      use IP as source IP address\n        +tcp                      send query via TCP\n        +ignore                   ignore truncation (don't retry with TCP)\n        +aaonly                   set authoritative answer bit\n        +adflag                   set authenticated data bit\n        +cdflag                   set checking disabled bit\n        +norecurse                set rd bit to 0 (recursion not desired)\n        +edns[=N]                 use EDNS with specified version (default 0)\n        +ednsflags=N              set EDNS flags field to N\n        +ednsopt=###[:value]      set generic EDNS option\n        +bufsize=NN               use EDNS with specified UDP payload size\n        +dnssec                   request DNSSEC RRs in response\n        +hex                      print hexdump of rdata field\n        +nsid                     send NSID (Name Server ID) option\n        +expire                   send an EDNS Expire option\n        +cookie[=xxx]             send EDNS cookie option\n        +subnet=addr              send EDNS client subnet option\n        +chainquery[=name]        send EDNS chain query option\n        +padding[=N]              send EDNS padding option (defblocksize 128)\n        +walk                     walk (enumerate) a DNSSEC secured zone\n        +0x20                     randomize case of query name (bit 0x20 hack)\n        +emptyquestion            send an empty question section\n        +generic                  use RFC3597 generic type/class/rdata format\n        -4                        perform queries using IPv4\n        -6                        perform queries using IPv6\n        -x                        reverse lookup of IPv4/v6 address in qname\n        -d                        request additional debugging output\n        -k/path/to/keyfile        use TSIG key in specified file\n        -iNNN                     use specified message id\n        -y\u003calg\u003e:\u003cname\u003e:\u003ckey\u003e      use specified TSIG alg, name, key\n        +tls=auth|noauth          use TLS with|without authentication\n        +tls_port=N               use N as the TLS port (default is 853)\n        +tls_fallback             Fallback from TLS to TCP on TLS failure\n        +tls_hostname=name        Check hostname in TLS server certificate\n        +https[=url]              use HTTPS transport with optional URL\n``\n\nIXFR (Incremental Zone Transfer) queries are supported with the syntax\nof \"IXFR=NNNN\" for the \u003cqtype\u003e, where NNNN is the zone serial number.\n\n```\nExample usage:\n\n       pydig www.example.com\n       pydig www.example.com A\n       pydig www.example.com A IN\n       pydig @10.0.1.2 example.com MX\n       pydig @dns1.example.com _blah._tcp.foo.example.com SRV\n       pydig @192.168.42.6 +dnssec +norecurse blah.example.com NAPTR\n       pydig @dns2.example.com -6 +hex www.example.com\n       pydig @192.168.72.3 +walk secure.example.com\n       pydig @192.168.14.7 -yhmac-md5:my.secret.key.:YWxidXMgZHVtYmxlZG9yZSByaWNoYXJkIGRhd2tpbnM= example.com axfr\n       pydig @192.168.14.7 -yhmac-sha256:my.secret.key.:NBGFWFr+rR/uu14B94Ab1+u81M2DTqB65gOv16nG8Xw= example.com axfr\n       pydig @185.49.141.38 +tls=auth +tls_hostname=getdnsapi.net www.ietf.org AAAA\n       pydig +padding=256 blah.example.com AAAA\n       pydig +https www.ietf.org A\n```\n\n# Additional Notes\n\nFor TSIG (Transaction Signature) signed messages, the program supports\nHMAC-MD5/SHA1/SHA256/SHA384/SHA256. It doesn't yet support GSS-TSIG.\n\nIt decodes but does not yet verify signatures in DNSSEC secured data.\n\nIt does not perform iterative resolution (eg. dig's +trace).\n\nSpecific features of TLS depend on the version of Python in use. TLS server\ncertificate verification and hostname verification require quite recent\nversions of Python.\n\nFor +https, if no URL is specified, then by default Cloudflare's DNS over\nHTTPS server is queried (https://cloudflare-dns.com/dns-query).\n\n\n# Pre-requisites:\n\n* Python 3\n* \"requests\" module\n\n# Installation:\n\n1. pip3 install requests (if necessary)\n2. python3 setup.py install\n\n# License\n\nShumon Huque\nE-mail: shuque -at- gmail.com\nWeb: https://www.huque.com/\n\nCopyright (c) 2006 - 2017, Shumon Huque. \nAll rights reserved. This program is free software; you can redistribute \nit and/or modify it under the same terms of the GNU General Public License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuque%2Fpydig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshuque%2Fpydig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuque%2Fpydig/lists"}