|
|
@ -30,17 +30,17 @@ const Wappalyzer = {
|
|
|
|
let version = ''
|
|
|
|
let version = ''
|
|
|
|
let confidence = 0
|
|
|
|
let confidence = 0
|
|
|
|
|
|
|
|
|
|
|
|
detections.forEach(({ technology: { name }, pattern, match }) => {
|
|
|
|
detections.forEach(
|
|
|
|
if (name === technology.name) {
|
|
|
|
({ technology: { name }, pattern, version: _version = '' }) => {
|
|
|
|
const versionValue = Wappalyzer.resolveVersion(pattern, match)
|
|
|
|
if (name === technology.name) {
|
|
|
|
|
|
|
|
confidence = Math.min(100, confidence + pattern.confidence)
|
|
|
|
confidence = Math.min(100, confidence + pattern.confidence)
|
|
|
|
version =
|
|
|
|
version =
|
|
|
|
_version.length > version.length && _version.length <= 10
|
|
|
|
versionValue.length > version.length && versionValue.length <= 10
|
|
|
|
? _version
|
|
|
|
? versionValue
|
|
|
|
: 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)
|
|
|
|
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|