Skip to content

Commit

Permalink
Updated - readme & version no
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiIgna committed Sep 11, 2020
1 parent e9c32f6 commit ffe1dd8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

Uses `dig` command to make DNS requests, has a built-in list of subdomains to test for and support for auto-discovering more subdomains based on records found.

→ See it in action here https://dmns.app

## Highlights
* Retrieves really fast DNS records for a domain
* Discovers all A, AAAA and CNAME for a domain
Expand Down
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ const getAllRecords = async domain => {
}


// Check if new subdomains were discovered
// Check if new subdomains can be extracted from a DNS Record's value
let extraSubdomains = []
const extractNewSubdomains = subdomain => {
let s = subdomain.type === 'MX' ? subdomain.value.split(' ').pop() : subdomain.value
Expand All @@ -304,6 +304,8 @@ const getAllRecords = async domain => {
if (isDomain(s) && s.endsWith(`.${domain}`) && !checked.includes(s)) {
let subdomainParts = s.replace(`.${domain}`, '').split('.')

// if a sub sub domain is found, example abc.def.example.com,
// extract all subdomain levels like def.example.com, abc.def.example.com
while (subdomainParts.length) {
extraSubdomains.push(`${subdomainParts.join('.')}.${domain}`)
checked.push(`${subdomainParts.join('.')}.${domain}`)
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@layered/dns-records",
"version": "1.4.1",
"version": "1.4.2",
"description": "Discover publicly available DNS Records for a domain",
"keywords": [
"dns",
Expand Down

0 comments on commit ffe1dd8

Please sign in to comment.