Track rootPath detections

main
Elbert Alias 2 years ago
parent c7417f1b89
commit 670614082e

@ -1126,6 +1126,7 @@ class Site {
website, website,
cpe, cpe,
categories, categories,
rootPath,
}) => ({ }) => ({
slug, slug,
name, name,
@ -1140,6 +1141,7 @@ class Site {
slug, slug,
name, name,
})), })),
rootPath,
}) })
), ),
patterns, patterns,
@ -1272,6 +1274,15 @@ class Site {
) === index ) === index
) )
// Track if technology was identified on website's root path
detections.forEach(({ technology: { name } }) => {
const detection = this.detections.find(
({ technology: { name: _name } }) => name === _name
)
detection.rootPath = detection.rootPath || url.pathname === '/'
})
if (this.cache[url.href]) { if (this.cache[url.href]) {
const resolved = resolve(this.detections) const resolved = resolve(this.detections)

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

@ -101,10 +101,12 @@ const Driver = {
) )
} }
} else if (version !== previous && upgradeMessage) { } else if (version !== previous && upgradeMessage) {
/*
open( open(
`https://www.wappalyzer.com/upgraded/?utm_source=upgraded&utm_medium=extension&utm_campaign=wappalyzer`, `https://www.wappalyzer.com/upgraded/?utm_source=upgraded&utm_medium=extension&utm_campaign=wappalyzer`,
false false
) )
*/
} }
initDone() initDone()
@ -152,6 +154,13 @@ const Driver = {
} }
} }
Object.keys(technologies).forEach((name) => {
delete technologies[name].description
delete technologies[name].cpe
delete technologies[name].pricing
delete technologies[name].website
})
setTechnologies(technologies) setTechnologies(technologies)
setCategories(categories) setCategories(categories)
} catch (error) { } catch (error) {
@ -560,7 +569,7 @@ const Driver = {
url = url.split('#')[0] url = url.split('#')[0]
const { hostname } = new URL(url) const { hostname, pathname } = new URL(url)
// Cache detections // Cache detections
const cache = (Driver.cache.hostnames[hostname] = { const cache = (Driver.cache.hostnames[hostname] = {
@ -605,6 +614,39 @@ const Driver = {
return detection return detection
}) })
// Track if technology was identified on website's root path
detections.forEach(({ technology: { name } }) => {
const detection = cache.detections.find(
({ technology: { name: _name } }) => name === _name
)
detection.rootPath = detection.rootPath || pathname === '/'
})
const resolved = resolve(cache.detections).map((detection) => detection)
// Look for technologies that require other technologies to be present on the page
const requires = [
...Wappalyzer.requires.filter(({ name }) =>
resolved.some(({ name: _name }) => _name === name)
),
...Wappalyzer.categoryRequires.filter(({ categoryId }) =>
resolved.some(({ categories }) =>
categories.some(({ id }) => id === categoryId)
)
),
]
try {
await Driver.content(url, 'analyzeRequires', [url, requires])
} catch (error) {
// Continue
}
await Driver.setIcon(url, resolved)
await Driver.ping()
cache.hits += incrementHits ? 1 : 0 cache.hits += incrementHits ? 1 : 0
cache.language = cache.language || language cache.language = cache.language || language
@ -628,6 +670,7 @@ const Driver = {
return hostnames return hostnames
}, {}) }, {})
// Save cache
await setOption( await setOption(
'hostnames', 'hostnames',
Object.keys(Driver.cache.hostnames).reduce( Object.keys(Driver.cache.hostnames).reduce(
@ -642,6 +685,7 @@ const Driver = {
technology: { name: technology }, technology: { name: technology },
pattern: { regex, confidence }, pattern: { regex, confidence },
version, version,
rootPath,
lastUrl, lastUrl,
}) => ({ }) => ({
technology, technology,
@ -650,6 +694,7 @@ const Driver = {
confidence, confidence,
}, },
version, version,
rootPath,
lastUrl, lastUrl,
}) })
), ),
@ -659,30 +704,7 @@ const Driver = {
) )
) )
const resolved = resolve(cache.detections).map((detection) => detection)
const requires = [
...Wappalyzer.requires.filter(({ name }) =>
resolved.some(({ name: _name }) => _name === name)
),
...Wappalyzer.categoryRequires.filter(({ categoryId }) =>
resolved.some(({ categories }) =>
categories.some(({ id }) => id === categoryId)
)
),
]
try {
await Driver.content(url, 'analyzeRequires', [url, requires])
} catch (error) {
// Continue
}
await Driver.setIcon(url, resolved)
Driver.log({ hostname, technologies: resolved }) Driver.log({ hostname, technologies: resolved })
await Driver.ping()
}, },
/** /**
@ -930,11 +952,12 @@ const Driver = {
if (!hostnameIgnoreList.test(hostname) && hits) { if (!hostnameIgnoreList.test(hostname) && hits) {
urls[url] = urls[url] || { urls[url] = urls[url] || {
technologies: resolve(detections).reduce( technologies: resolve(detections).reduce(
(technologies, { name, confidence, version }) => { (technologies, { name, confidence, version, rootPath }) => {
if (confidence === 100) { if (confidence === 100) {
technologies[name] = { technologies[name] = {
version, version,
hits, hits,
rootPath,
} }
} }

@ -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.10.46", "version": "6.10.47",
"default_locale": "en", "default_locale": "en",
"manifest_version": 2, "manifest_version": 2,
"icons": { "icons": {

@ -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.10.46", "version": "6.10.47",
"default_locale": "en", "default_locale": "en",
"manifest_version": 3, "manifest_version": 3,
"icons": { "icons": {

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

@ -147,6 +147,35 @@
}, },
"website": "http://dragonflycms.org" "website": "http://dragonflycms.org"
}, },
"CRM+": {
"cats": [
53
],
"description": "CRM+ is a German CRM software product building on Vtiger with GDPR-compliant extensions and improvements.",
"dom": {
"div.footer > div.floatRight ": {
"text": "Powered by Brainformatik GmbH"
}
},
"icon": "CRM+.png",
"implies": [
"MariaDB",
"amCharts",
"Sentry",
"Vtiger"
],
"pricing": [
"mid",
"recurring",
"poa",
"freemium"
],
"requires": [
"Apache",
"PHP"
],
"website": "https://www.brainformatik.com"
},
"CS Cart": { "CS Cart": {
"cats": [ "cats": [
6 6
@ -3366,35 +3395,6 @@
], ],
"website": "http://criteo.com" "website": "http://criteo.com"
}, },
"CRM+": {
"cats": [
53
],
"description": "CRM+ is a German CRM software product building on Vtiger with GDPR-compliant extensions and improvements.",
"dom": {
"div.footer > div.floatRight ": {
"text": "Powered by Brainformatik GmbH"
}
},
"icon": "CRM+.png",
"implies": [
"MariaDB",
"amCharts",
"Sentry",
"Vtiger"
],
"requires": [
"Apache",
"PHP"
],
"pricing": [
"mid",
"recurring",
"poa",
"freemium"
],
"website": "https://www.brainformatik.com"
},
"Crobox": { "Crobox": {
"cats": [ "cats": [
5 5

@ -140,17 +140,6 @@
"scriptSrc": "cdn\\.pushcrew\\.\\w+", "scriptSrc": "cdn\\.pushcrew\\.\\w+",
"website": "https://vwo.com/engage" "website": "https://vwo.com/engage"
}, },
"vxe-table": {
"cats": [
59
],
"description": "vxe-table is a Vue.js based PC form component, support add, delete, change, virtual scroll, lazy load, shortcut menu, data validation, tree structure, print export, form rendering, data paging, virtual list, modal window, custom template, renderer, flexible configuration items, extension interface.",
"icon": "vxe-table.png",
"requires": "Vue.js",
"dom": "div[class*='vxe-table']",
"oss": true,
"website": "https://vxetable.cn"
},
"Vaadin": { "Vaadin": {
"cats": [ "cats": [
18 18
@ -770,8 +759,8 @@
} }
}, },
"icon": "Visx.svg", "icon": "Visx.svg",
"requires": "React",
"oss": true, "oss": true,
"requires": "React",
"website": "https://airbnb.io/visx/" "website": "https://airbnb.io/visx/"
}, },
"Vitals": { "Vitals": {
@ -1108,5 +1097,16 @@
"generator": "vibecommerce" "generator": "vibecommerce"
}, },
"website": "http://vibecommerce.com.br" "website": "http://vibecommerce.com.br"
},
"vxe-table": {
"cats": [
59
],
"description": "vxe-table is a Vue.js based PC form component, support add, delete, change, virtual scroll, lazy load, shortcut menu, data validation, tree structure, print export, form rendering, data paging, virtual list, modal window, custom template, renderer, flexible configuration items, extension interface.",
"dom": "div[class*='vxe-table']",
"icon": "vxe-table.png",
"oss": true,
"requires": "Vue.js",
"website": "https://vxetable.cn"
} }
} }

@ -104,24 +104,32 @@ const Wappalyzer = {
) { ) {
let version = '' let version = ''
let confidence = 0 let confidence = 0
let rootPath
detections detections
.filter(({ technology }) => technology) .filter(
({ technology: _technology }) =>
_technology && _technology.name === technology.name
)
.forEach( .forEach(
({ technology: { name }, pattern, version: _version = '' }) => { ({
if (name === technology.name) { technology: { name },
confidence = Math.min(100, confidence + pattern.confidence) pattern,
version = version: _version = '',
_version.length > version.length && rootPath: _rootPath,
_version.length <= 15 && }) => {
(parseInt(_version, 10) || 0) < 10000 // Ignore long numeric strings like timestamps confidence = Math.min(100, confidence + pattern.confidence)
? _version version =
: version _version.length > version.length &&
} _version.length <= 15 &&
(parseInt(_version, 10) || 0) < 10000 // Ignore long numeric strings like timestamps
? _version
: version
rootPath = rootPath || _rootPath || undefined
} }
) )
resolved.push({ technology, confidence, version, lastUrl }) resolved.push({ technology, confidence, version, rootPath, lastUrl })
} }
return resolved return resolved
@ -152,6 +160,7 @@ const Wappalyzer = {
}, },
confidence, confidence,
version, version,
rootPath,
lastUrl, lastUrl,
}) => ({ }) => ({
name, name,
@ -164,6 +173,7 @@ const Wappalyzer = {
website, website,
pricing, pricing,
cpe, cpe,
rootPath,
lastUrl, lastUrl,
}) })
) )
@ -360,7 +370,7 @@ const Wappalyzer = {
technologies.push({ technologies.push({
name, name,
description, description: description || null,
categories: cats || [], categories: cats || [],
slug: Wappalyzer.slugify(name), slug: Wappalyzer.slugify(name),
url: transform(url), url: transform(url),