Add detection via DNS, fix Safari issues

main
Elbert Alias 4 years ago
parent b5de6ae560
commit 17b1c32990

@ -81,6 +81,14 @@
} }
} }
}, },
"dns": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^.+$": {
}
}
},
"headers": { "headers": {
"type": "object", "type": "object",
"additionalProperties": false, "additionalProperties": false,

@ -634,40 +634,54 @@ class Site {
// DNS // DNS
if (!this.dns.length) { if (!this.dns.length) {
try { const records = {}
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\./, '')),
])
)
this.dns = Object.keys(records).reduce((dns, type) => { const resolve = async (func, hostname) => {
dns[type] = dns[type] || [] try {
return await this.promiseTimeout(func(hostname))
} catch (error) {
if (error.code !== 'ENODATA') {
this.error(error)
}
Array.prototype.push.apply( return []
dns[type], }
records[type] }
.map((value) => (value.exchange ? value.exchange : value))
.flat()
)
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 })) return dns
} catch (error) { }, {})
// Continue
} this.onDetect(analyze({ dns: this.dns }))
} }
// Validate response // Validate response

@ -13,7 +13,7 @@
"software" "software"
], ],
"homepage": "https://www.wappalyzer.com/", "homepage": "https://www.wappalyzer.com/",
"version": "6.3.10", "version": "6.3.11",
"author": "Wappalyzer", "author": "Wappalyzer",
"license": "MIT", "license": "MIT",
"repository": { "repository": {

@ -93,7 +93,7 @@ a:hover {
.alerts__icon { .alerts__icon {
color: var(--color-primary); color: var(--color-primary);
height: 1.1rem; height: 1.1rem;
margin-right: .5rem; margin-right: .3rem;
vertical-align: text-bottom; vertical-align: text-bottom;
width: 1.1rem; width: 1.1rem;
} }
@ -344,6 +344,11 @@ a:hover {
color: #fff 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 { .theme-mode .technology__confidence {
} }
@ -360,7 +365,19 @@ a:hover {
color: var(--color-text-dark); color: var(--color-text-dark);
} }
.theme-mode .footer__icon {
color: #fff;
}
.theme-mode .alerts__icon { .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;
} }
} }

@ -43,7 +43,7 @@
<span data-i18n="optionThemeMode">&nbsp;</span> <span data-i18n="optionThemeMode">&nbsp;</span>
</label> </label>
<button data-i18n="clearCache" class="options__cache"></button> <button data-i18n="clearCache" class="options__cache">&nbsp;</button>
</div> </div>
</body> </body>
</html> </html>

@ -73,9 +73,14 @@ const Driver = {
const upgradeMessage = await getOption('upgradeMessage', true) const upgradeMessage = await getOption('upgradeMessage', true)
if (previous === null) { 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) { } 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) await setOption('version', version)
@ -260,7 +265,11 @@ const Driver = {
let certIssuer = '' let certIssuer = ''
if (typeof browser !== 'undefined') { if (
browser &&
browser.webRequest &&
browser.webRequest.getSecurityInfo
) {
// Currently only works in Firefox // Currently only works in Firefox
// See https://stackoverflow.com/a/50484642 // See https://stackoverflow.com/a/50484642
const { certificates } = await browser.webRequest.getSecurityInfo( const { certificates } = await browser.webRequest.getSecurityInfo(
@ -348,7 +357,7 @@ const Driver = {
* @param {Boolean} incrementHits * @param {Boolean} incrementHits
*/ */
async onDetect(url, detections = [], language, incrementHits = false) { async onDetect(url, detections = [], language, incrementHits = false) {
if (!detections.length) { if (!url || !detections.length) {
return return
} }

@ -4,7 +4,7 @@
"author": "Wappalyzer", "author": "Wappalyzer",
"homepage_url": "https://www.wappalyzer.com/", "homepage_url": "https://www.wappalyzer.com/",
"description": "Identify web technologies", "description": "Identify web technologies",
"version": "6.3.9", "version": "6.3.10",
"default_locale": "en", "default_locale": "en",
"manifest_version": 2, "manifest_version": 2,
"icons": { "icons": {

@ -13,7 +13,7 @@
"software" "software"
], ],
"homepage": "https://www.wappalyzer.com/", "homepage": "https://www.wappalyzer.com/",
"version": "6.3.10", "version": "6.3.11",
"author": "Wappalyzer", "author": "Wappalyzer",
"license": "MIT", "license": "MIT",
"repository": { "repository": {

@ -1798,6 +1798,14 @@
"ARRAffinity": "", "ARRAffinity": "",
"TiPMix": "" "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.", "description": "Azure is a cloud computing service for building, testing, deploying, and managing applications and services through Microsoft-managed data centers.",
"headers": { "headers": {
"azure-regionname": "", "azure-regionname": "",
@ -7874,6 +7882,11 @@
32 32
], ],
"cpe": "cpe:/a:thinkshout:mailchimp", "cpe": "cpe:/a:thinkshout:mailchimp",
"dns": {
"TXT": [
"spf\\.mandrillapp\\.com"
]
},
"description": "Mailchimp is a marketing automation platform and email marketing service.", "description": "Mailchimp is a marketing automation platform and email marketing service.",
"html": [ "html": [
"<form [^>]*data-mailchimp-url", "<form [^>]*data-mailchimp-url",