Skip to content

Commit

Permalink
run build
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiIgna committed Jan 22, 2024
1 parent e45ed2c commit c2226f7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const isDomain = (domain) => {
domain = domain.substring(0, domain.length - 1);
}
const labels = toASCII(domain).split('.').reverse();
const labelTest = /^([a-z0-9-]{1,64}|xn[a-z0-9-]{5,})$/i;
const labelTest = /^([a-z0-9-_]{1,64}|xn[a-z0-9-]{5,})$/i;
return labels.length > 1 && labels.every((label, index) => {
return index ? !label.startsWith('-') && !label.endsWith('-') && labelTest.test(label) : isTld(label);
});
Expand Down Expand Up @@ -125,7 +125,7 @@ export function getAllDnsRecordsStream(domain, options = {}) {
if (subdomain && !subdomainsChecked.includes(subdomain)) {
runningChecks++;
subdomainsChecked.push(subdomain);
getDnsRecords(`${subdomain}.${domain}`, 'A').then(sendRecords);
getDnsRecords(`${subdomain}.${domain}`, 'A', options.resolver).then(sendRecords);
}
}
}
Expand All @@ -151,11 +151,11 @@ export function getAllDnsRecordsStream(domain, options = {}) {
addSubdomain(r.data);
}
});
getDnsRecords(domain, 'SOA').then(sendRecords);
getDnsRecords(domain, 'SOA', options.resolver).then(sendRecords);
//getDnsRecords(domain, 'CAA').then(sendRecords)
getDnsRecords(domain, 'A').then(sendRecords);
getDnsRecords(domain, 'AAAA').then(sendRecords);
getDnsRecords(domain, 'MX').then(records => {
getDnsRecords(domain, 'A', options.resolver).then(sendRecords);
getDnsRecords(domain, 'AAAA', options.resolver).then(sendRecords);
getDnsRecords(domain, 'MX', options.resolver).then(records => {
records.forEach(r => {
if (r.data.includes(domain)) {
const parts = r.data.split(' ');
Expand All @@ -166,7 +166,7 @@ export function getAllDnsRecordsStream(domain, options = {}) {
});
sendRecords(records);
});
getDnsRecords(domain, 'TXT').then(records => {
getDnsRecords(domain, 'TXT', options.resolver).then(records => {
records.forEach(r => {
// extract subdomains from SPF records
if (r.data.includes('v=spf1') && r.data.includes(domain)) {
Expand Down
4 changes: 2 additions & 2 deletions 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": "2.0.0-beta.4",
"version": "2.0.0-beta.5",
"description": "Discover publicly available DNS Records for a domain",
"type": "module",
"keywords": [
Expand Down

0 comments on commit c2226f7

Please sign in to comment.