diff --git a/schema.json b/schema.json index 2317dd54c..cb27d638b 100644 --- a/schema.json +++ b/schema.json @@ -81,6 +81,14 @@ } } }, + "dns": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^.+$": { + } + } + }, "headers": { "type": "object", "additionalProperties": false, diff --git a/src/drivers/npm/driver.js b/src/drivers/npm/driver.js index cc8e1cec0..16a75ac73 100644 --- a/src/drivers/npm/driver.js +++ b/src/drivers/npm/driver.js @@ -634,40 +634,54 @@ class Site { // DNS if (!this.dns.length) { - try { - const records = {} - - ;[ - records.cname, - records.ns, - records.mx, - records.txt, - ] = await this.promiseTimeout( - Promise.all([ - dns.resolveCname(url.hostname), - dns.resolveNs(url.hostname), - dns.resolveMx(url.hostname.replace(/^www\./, '')), - dns.resolveTxt(url.hostname.replace(/^www\./, '')), - ]) - ) + const records = {} - this.dns = Object.keys(records).reduce((dns, type) => { - dns[type] = dns[type] || [] + const resolve = async (func, hostname) => { + try { + return await this.promiseTimeout(func(hostname)) + } catch (error) { + if (error.code !== 'ENODATA') { + this.error(error) + } - Array.prototype.push.apply( - dns[type], - records[type] - .map((value) => (value.exchange ? value.exchange : value)) - .flat() - ) + return [] + } + } - return dns - }, {}) + const domain = url.hostname.replace(/^www\./, '') + + ;[ + records.cname, + records.ns, + records.mx, + records.txt, + records.soa, + ] = await Promise.all([ + resolve(dns.resolveCname, url.hostname), + resolve(dns.resolveNs, domain), + resolve(dns.resolveMx, domain), + resolve(dns.resolveTxt, domain), + resolve(dns.resolveSoa, domain), + ]) + + this.dns = Object.keys(records).reduce((dns, type) => { + dns[type] = dns[type] || [] + + Array.prototype.push.apply( + dns[type], + Array.isArray(records[type]) + ? records[type].map((value) => { + return typeof value === 'object' + ? Object.values(value).join(' ') + : value + }) + : [Object.values(records[type]).join(' ')] + ) - this.onDetect(analyze({ dns: this.dns })) - } catch (error) { - // Continue - } + return dns + }, {}) + + this.onDetect(analyze({ dns: this.dns })) } // Validate response diff --git a/src/drivers/npm/package.json b/src/drivers/npm/package.json index 30ec4c8f1..c2e8ff1ac 100644 --- a/src/drivers/npm/package.json +++ b/src/drivers/npm/package.json @@ -13,7 +13,7 @@ "software" ], "homepage": "https://www.wappalyzer.com/", - "version": "6.3.10", + "version": "6.3.11", "author": "Wappalyzer", "license": "MIT", "repository": { diff --git a/src/drivers/webextension/css/styles.css b/src/drivers/webextension/css/styles.css index 02dceaeb8..7e8f0e84a 100644 --- a/src/drivers/webextension/css/styles.css +++ b/src/drivers/webextension/css/styles.css @@ -93,7 +93,7 @@ a:hover { .alerts__icon { color: var(--color-primary); height: 1.1rem; - margin-right: .5rem; + margin-right: .3rem; vertical-align: text-bottom; width: 1.1rem; } @@ -344,6 +344,11 @@ a:hover { color: #fff } + .theme-mode .technology__link:hover .technology__name { + border-bottom: 1px solid var(--color-text-dark); + color: var(--color-text-dark); + } + .theme-mode .technology__confidence { } @@ -360,7 +365,19 @@ a:hover { color: var(--color-text-dark); } + .theme-mode .footer__icon { + color: #fff; + } + .theme-mode .alerts__icon { - color:var(--color-text-dark); + color: #fff; + } + + .theme-mode .header__open-in-new { + color: #fff; + } + + .theme-mode .technology__open-in-new { + color: #fff; } } diff --git a/src/drivers/webextension/html/options.html b/src/drivers/webextension/html/options.html index 3dfc531d4..b07b09cab 100644 --- a/src/drivers/webextension/html/options.html +++ b/src/drivers/webextension/html/options.html @@ -43,7 +43,7 @@   - + diff --git a/src/drivers/webextension/js/driver.js b/src/drivers/webextension/js/driver.js index 07634c86b..c84279c44 100644 --- a/src/drivers/webextension/js/driver.js +++ b/src/drivers/webextension/js/driver.js @@ -73,9 +73,14 @@ const Driver = { const upgradeMessage = await getOption('upgradeMessage', true) if (previous === null) { - open('https://www.wappalyzer.com/installed/') + open( + 'https://www.wappalyzer.com/installed/?utm_source=installed&utm_medium=extension&utm_campaign=wappalyzer' + ) } else if (version !== previous && upgradeMessage) { - open(`https://www.wappalyzer.com/upgraded/?v${version}`, false) + open( + `https://www.wappalyzer.com/upgraded/?utm_source=upgraded&utm_medium=extension&utm_campaign=wappalyzer`, + false + ) } await setOption('version', version) @@ -260,7 +265,11 @@ const Driver = { let certIssuer = '' - if (typeof browser !== 'undefined') { + if ( + browser && + browser.webRequest && + browser.webRequest.getSecurityInfo + ) { // Currently only works in Firefox // See https://stackoverflow.com/a/50484642 const { certificates } = await browser.webRequest.getSecurityInfo( @@ -348,7 +357,7 @@ const Driver = { * @param {Boolean} incrementHits */ async onDetect(url, detections = [], language, incrementHits = false) { - if (!detections.length) { + if (!url || !detections.length) { return } diff --git a/src/drivers/webextension/manifest.json b/src/drivers/webextension/manifest.json index 94956530a..848b5da85 100644 --- a/src/drivers/webextension/manifest.json +++ b/src/drivers/webextension/manifest.json @@ -4,7 +4,7 @@ "author": "Wappalyzer", "homepage_url": "https://www.wappalyzer.com/", "description": "Identify web technologies", - "version": "6.3.9", + "version": "6.3.10", "default_locale": "en", "manifest_version": 2, "icons": { diff --git a/src/package.json b/src/package.json index 709d0fe70..862763e55 100644 --- a/src/package.json +++ b/src/package.json @@ -13,7 +13,7 @@ "software" ], "homepage": "https://www.wappalyzer.com/", - "version": "6.3.10", + "version": "6.3.11", "author": "Wappalyzer", "license": "MIT", "repository": { diff --git a/src/technologies.json b/src/technologies.json index 78c2ad8ce..a49c14c80 100644 --- a/src/technologies.json +++ b/src/technologies.json @@ -1798,6 +1798,14 @@ "ARRAffinity": "", "TiPMix": "" }, + "dns": { + "NS": [ + "\\.azure-dns\\." + ], + "SOA": [ + "azuredns-cloud\\.net" + ] + }, "description": "Azure is a cloud computing service for building, testing, deploying, and managing applications and services through Microsoft-managed data centers.", "headers": { "azure-regionname": "", @@ -7874,6 +7882,11 @@ 32 ], "cpe": "cpe:/a:thinkshout:mailchimp", + "dns": { + "TXT": [ + "spf\\.mandrillapp\\.com" + ] + }, "description": "Mailchimp is a marketing automation platform and email marketing service.", "html": [ "
]*data-mailchimp-url",