dnstools
v2.0.3
Published
An all in one dns related tools
Downloads
19
Maintainers
Readme
All in one library for dns query
DNS Tools is powered by view-dns and ip-api. It provides you with a bunch of dns related search api.
Node versions
v8.15.0 +
Features
- All in one DNS Query Library
- No Dependency
- Formatted OUTPUT
- Fast
- Reliable
Functions
- [x] Reverse IP Lookup
- [x] IP To Location
- [x] Check if host is down
- [x] ASN Lookup
- [x] Reverse MX Lookup
- [x] Chinese Firewall Test
- [x] Port Scan
- [x] IP History
- [x] DNS Report
- [x] DNSSEC Test
- [ ] WHOIS Report
- [ ] Reverse Whois Lookup
- [ ] Iran Firewall Test
- [ ] DNS Record Lookup
- [ ] Spam Database Lookup
- [ ] Abuse Contact Lookup
- [ ] Reverse NS Lookup
- [ ] DNS Propagation Checker
- [ ] Reverse DNS Lookup
- [ ] MAC Address Lookup
Install and Use
npm i dnstools@latest
Demonstrating IP Location
const dnstool = require("dnstools");
dnstool.ipLocation("172.9.8.5", (err, data) => {
if (err) {
console.log("error in query");
} else {
console.log(data);
/* OUTPUT
{ as: 'AS7018 AT&T Services, Inc.',
city: 'Los Angeles',
country: 'United States',
countryCode: 'US',
isp: 'AT&T Services, Inc.',
lat: 34.0818,
lon: -118.1753,
org: 'AT&T Corp',
query: '172.9.8.5',
region: 'CA',
regionName: 'California',
status: 'success',
timezone: 'America/Los_Angeles',
zip: '90032' }
*/
}
});
API
| Function | Description | Parameters | Callback Data |
| :-------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------- | :-------------------------------------------- |
| reverseIp | Reverse lookup to quickly shows all other domains hosted from the same server. | host: String
callback: callback(err, data)
| err: Error
or String
data: Array
|
| ipLocation | Display geographic information about a supplied IP address including city, country, latitude, longitude and more. | ip: String
callback: callback(err, data)
| err: Error
or String
data: Object
|
| isHostDown | Checks whether a specified site is down or not. | host: string
callback: callback(err, data)
| err: Error
or String
data: Boolean
|
| asnLookup | Determine which company owns the specified Autonomous System Number | asn: Number
callback: callback(err, data)
| err: Error
or String
data: Object
|
| reverseMX | Takes a mail server (e.g. mail.google.com
) and quickly shows all other domains that use the same mail server | mailServer: String
callback: callback(err, data)
| err: Error
or String
data: Array
|
| chineseFirewall | Checks whether a site is blocked by the Great Firewall of China | host: String
callback: callback(err, data)
| err: Error
or String
data: Array
|
| portScan | Port scanner will test whether common ports are open on a server. Ports scanned are: 21, 22, 23, 25, 80, 110, 139, 143, 445, 1433, 1521, 3306 and 3389 | host: String
callback: callback(err, data)
| err: Error
or String
data: Array
|
| ipHistory | Shows a historical list of IP addresses a given domain name has been hosted on as well as where that IP address is geographically located, and the owner of that IP address. | host: String
callback: callback(err, data)
| err: Error
or String
data: Array
|
| dnssec | Test if any domain name is configured for DNSSEC (Domain Name System Security Extensions). | host: String
callback: callback(err, data)
| err: Error
or String
data: Object
|
| dnsreport | View a complete report on the DNS settings for your domain. This tool is designed to assist webmasters and system administrators diagnose DNS related issues. A number of tests are run on your DNS settings with results displayed in an easy to understand manner. | host: String
callback: callback(err, data)
| err: Error
or String
data: Object
|
License
DNS Tool is licensed under Apache-2.0
Contribution
Read contribution guidelines from here