7437de1e37 | ||
---|---|---|
bin | ||
lib | ||
samples | ||
.gitignore | ||
.jshintrc | ||
HOW_DELEGATION_WORKS.md | ||
README.md | ||
TESTS.md | ||
package.json |
README.md
digd.js
| dns-suite | dig.js | digd.js
A lightweight DNS / mDNS daemon (server) for creating and capturing DNS and mDNS query and response packets to disk as binary and/or JSON. Options are similar to the Unix dig command.
Install
with git
# Install the latest of v1.x
npm install -g 'git+https://git@git.daplie.com/Daplie/digd.js.git#v1'
# Install exactly v1.0.0
npm install -g 'git+https://git@git.daplie.com/Daplie/digd.js.git#v1.0.0'
without git
Don't have git? Well, you can also bow down to the gods of the centralized, monopolized, concentrated, dictatornet (as we like to call it here at Daplie Labs), if that's how you roll:
npm install -g digd.js
Usage
digd.js --input <path/to/file.json>
Example:
digd.js --input ./examples/example.com.json
Testing
# unix dig
dig @localhost example.com
# dns-suite's dig.js
dig.js @localhost example.com
# unix netcat
netcat -u 127.0.0.1 53 < ./samples/example.com.a.query.bin
Options
--output <path/to/file> write query and response(s) to disk with this path prefix (ex: ./samples/dns)
--input <path/to/file> input file to use for authoritative responses (ex: ./samples/zones.json)
--mdns Use mDNS port (5353) and nameserver address (224.0.0.251)
-p <port> default 53 (mdns default: 5353) (listener is random for DNS and 5353 for mDNS)
--nameserver <ns> alias of @<nameserver>
--timeout <ms> alias of +time=<seconds>, but in milliseconds
@<nameserver> specify the nameserver to use for recursive DNS resolutions (defaults to system defaults)
+time=<seconds> Sets the timeout for a query in seconds.
+norecurse Set `ra` flag to 0. Do not perform recursion.
+aaonly Set `aa` flag to 1. Do not respond with non-authoritative responses.
--debug verbose output
Other Resources
You may also be interested in Unbound (https://unboundtest.com), which is an entirely different project by someone else which is much more complete, written in go, and may be very useful for debugging and linting.