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": {
"type": "object",
"additionalProperties": false,

@ -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

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

@ -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;
}
}

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

@ -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
}

@ -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": {

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

@ -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": [
"<form [^>]*data-mailchimp-url",