Build v6.0.5

main
Elbert Alias 4 years ago
parent 7cd761c2ae
commit 49fafd19a9

@ -31,19 +31,18 @@ const Driver = {
...hostnameCache[hostname], ...hostnameCache[hostname],
detections: hostnameCache[hostname].detections.map( detections: hostnameCache[hostname].detections.map(
({ ({
pattern: { regex, confidence, version }, technology: name,
match, pattern: { regex, confidence },
technology: name version
}) => ({ }) => ({
technology: Wappalyzer.technologies.find(
({ name: _name }) => name === _name
),
pattern: { pattern: {
regex: new RegExp(regex, 'i'), regex: new RegExp(regex, 'i'),
confidence, confidence
version
}, },
match, version
technology: Wappalyzer.technologies.find(
({ name: _name }) => name === _name
)
}) })
) )
} }
@ -69,7 +68,7 @@ const Driver = {
if (previous === null) { if (previous === null) {
Driver.open('https://www.wappalyzer.com/installed') Driver.open('https://www.wappalyzer.com/installed')
} else if (version !== previous && upgradeMessage) { } else if (version !== previous && upgradeMessage) {
Driver.open(`https://www.wappalyzer.com/upgraded?v${version}`, false) // Driver.open(`https://www.wappalyzer.com/upgraded?v${version}`, false)
} }
await setOption('version', version) await setOption('version', version)
@ -262,17 +261,16 @@ const Driver = {
...Driver.cache.hostnames[hostname], ...Driver.cache.hostnames[hostname],
detections: Driver.cache.hostnames[hostname].detections.map( detections: Driver.cache.hostnames[hostname].detections.map(
({ ({
pattern: { regex, confidence, version }, technology: { name: technology },
match, pattern: { regex, confidence },
technology: { name: technology } version
}) => ({ }) => ({
technology, technology,
pattern: { pattern: {
regex: regex.source, regex: regex.source,
confidence, confidence
version
}, },
match version
}) })
) )
} }

@ -30,17 +30,17 @@ const Wappalyzer = {
let version = '' let version = ''
let confidence = 0 let confidence = 0
detections.forEach(({ technology: { name }, pattern, match }) => { detections.forEach(
({ technology: { name }, pattern, version: _version = '' }) => {
if (name === technology.name) { if (name === technology.name) {
const versionValue = Wappalyzer.resolveVersion(pattern, match)
confidence = Math.min(100, confidence + pattern.confidence) confidence = Math.min(100, confidence + pattern.confidence)
version = version =
versionValue.length > version.length && versionValue.length <= 10 _version.length > version.length && _version.length <= 10
? versionValue ? _version
: version : version
} }
}) }
)
resolved.push({ technology, confidence, version }) resolved.push({ technology, confidence, version })
} }
@ -287,7 +287,11 @@ const Wappalyzer = {
analyzeOneToOne(technology, type, value) { analyzeOneToOne(technology, type, value) {
return technology[type].reduce((technologies, pattern) => { return technology[type].reduce((technologies, pattern) => {
if (pattern.regex.test(value)) { if (pattern.regex.test(value)) {
technologies.push({ technology, pattern, match: value }) technologies.push({
technology,
pattern,
version: Wappalyzer.resolveVersion(pattern, value)
})
} }
return technologies return technologies
@ -300,7 +304,11 @@ const Wappalyzer = {
patterns.forEach((pattern) => { patterns.forEach((pattern) => {
if (pattern.regex.test(value)) { if (pattern.regex.test(value)) {
technologies.push({ technology, pattern, match: value }) technologies.push({
technology,
pattern,
version: Wappalyzer.resolveVersion(pattern, value)
})
} }
}) })
@ -316,7 +324,11 @@ const Wappalyzer = {
patterns.forEach((pattern) => { patterns.forEach((pattern) => {
values.forEach((value) => { values.forEach((value) => {
if (pattern.regex.test(value)) { if (pattern.regex.test(value)) {
technologies.push({ technology, pattern, match: value }) technologies.push({
technology,
pattern,
version: Wappalyzer.resolveVersion(pattern, value)
})
} }
}) })
}) })

Loading…
Cancel
Save