
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
distributed-dig
Advanced tools
A utility which makes DNS lookup requests across multiple DNS resolvers and collates the results.
Install globally:
npm install -g distributed-dig
Lookup a single domain:
ddig domain
A utility which makes DNS lookup requests across multiple DNS resolvers and collates the results.
Useful for checking if a DNS record has been fully propagated, or for querying the origins behind an AWS Route 53 / Azure Traffic Manager record (or any other DNS-based load balancing solution).
Installing globally is recommended:
npm install -g distributed-dig
ddig domain [domain [domain] ...] [options]
The following options are available:
--port <number> Specify the DNS port [53]
--protocol <upd|tcp> Specify the DNS protocol [udp]
--timeout <number> Specify the DNS timeout in milliseconds [2500]
--edns <true|false> Enable or disable EDNS(0) [false]
--config <filename> Specify an alternative configuration file
--list-resolvers List resolvers configured in config file
--list-options List DNS request options configured in config file
--list-defaults Print json of default config file settings
--verbose Outputs more information
--no-color Switches off colour output
--version Display version number
--help Display this help
Specify the TCP/UDP port tro use when connecting to the DNS resolver.
Default: 53
Specify whether to use UDP or TCP when connecting to the DNS resolver.
Default: udp
Specifies the timeout in milliseconds to wait for a response from each DNS resolver.
Default: 2500
(2.5 seconds)
Enables EDNS(0)
Default: false
(disabled)
With EDNS(0) enabled, if an upstream resolver doesn't support it then the standard DNS will be used as a fallback.
Even though EDNS is support by ~90% of resolvers on the internet 1, it is disabled by default in ddig
as it may cause the resolver to return the IP address it considers closest to you, which is counter-productive to the purpose of querying many geographically distributed DNS resolvers.
Specifies an alternative configuration file.
To create a custom config you can:
ddig --list-defaults > custom.json
custom.json
ddig --config [path]custom.json example.com
Lists the resolvers configured in the distributed-dig.json
config file:
Lists the options configured in the distributed-dig.json
config file:
Prints out a sample default config file in raw json. Pipe it to a file for an initial customised configuration file.
Switches on verbose mode which outputs the following additional fields:
cname
records)--verbose
also modifies the --list-resolvers
and --list-options
switches.
If your terminal has problems rendering the colour output then you can switch it off by using --no-color
.
Prints out distributed-dig
's version number.
Displays the help screen:
www.asos.com
from each of the configured resolver:ddig www.asos.com
www.asos.com
from each of the configured resolver:ddig www.asos.com --verbose
www.asos.com
& secure.asos.com
from each of the configured resolver with a 5 second timeout:ddig www.asos.com my.asos.com secure.asos.com --timeout 5000
The first occurrence of each unique IP address is marked by a bullet point:
The bullet point character used is U+2022 • BULLET (HTML •)
. If it is detected that the output is being piped (to a file or to more
| cat
) then the ascii character 42 * Asterisk (HTML *)
If you use the --verbose
switch and have a terminal window that's narrower than 130 columns you'll see a warning:
All Options and Resolvers are configured in distributed-dig.json
file. This file can exist in any of the following locations:
node -p process.cwd()
node -p require('os').homedir()
distributed-dig.js
)The default options are:
"options": {
"request": {
"port": 53,
"type": "udp",
"timeout": 2500,
"try_edns": false,
"cache": false
},
"question": {
"type": "A"
}
}
Resolvers are configured in an array with each resolver having a nameServer
element which should be the IPv4 or IPv6 address, and a provider
element which is just a free-form text label:
"resolvers": [
{
"nameServer": "208.67.222.222",
"provider": "OpenDNS (Primary)"
},
{
"nameServer": "208.67.220.220",
"provider": "OpenDNS (Secondary)"
},
{
"nameServer": "217.199.173.113",
"provider": "United Kingdom"
}
]
You can find a list of public DNS servers here and tailor the configured list for your own requirements.
distributed-dig
uses the npm package debug. If you set the environment variable debug
to ddig
you'll see full debug output.
set debug=ddig
DEBUG=ddig
$env:debug="ddig"
nxdomain
. Non-existent domains aren't DNS errors, just an empty answer - so now handling those more sensibly.npm-shrinkwrap.json
problem that prevented npm update
succeeding.chalk
instead of colors
.--list-defaults
now pretty-prints the raw json output.process.stdout.isTTY
is false
1.npm
dependencies.--verbose
support tp --help
to display more information.chalk
instead of colors
(on --help
output).yargs
to version 14.2.0valid-filename
.colors
to version 1.4.0.
.debug
logging.--config
option.--config
.--config
option to specify an alternative configuration file.--list-defaults
option which prints a default config json file to the console; useful as an initial custom configuration file.--timeout
& --protocol
.Warning
logic for ignored domains to remove erroneous warnings with valid switches and options.Question: What terminal/console are you using in the screen shots?
Answer: A pre-release of Microsoft's new tabbed Windows Terminal which has many excellent features, and the ability to configure a background image.
[1.3.0] - February 14<sup>th</sup> 2020
nxdomain
. Non-existent domains aren't DNS errors, just an empty answer - so now handling those more sensibly.FAQs
A utility which makes DNS lookup requests across multiple DNS resolvers and collates the results.
The npm package distributed-dig receives a total of 3 weekly downloads. As such, distributed-dig popularity was classified as not popular.
We found that distributed-dig demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.