Output matched value in extended output

main
Elbert Alias 3 years ago
parent 43ecdcdb8c
commit 5f629ad25a

@ -998,7 +998,7 @@ class Site {
patterns, patterns,
{ {
technology: { name, implies, excludes }, technology: { name, implies, excludes },
pattern: { regex, confidence, type, version }, pattern: { regex, value, confidence, type, version },
} }
) => { ) => {
patterns[name] = patterns[name] || [] patterns[name] = patterns[name] || []
@ -1006,6 +1006,7 @@ class Site {
patterns[name].push({ patterns[name].push({
type, type,
regex: regex.source, regex: regex.source,
value: value.length <= 250 ? value : null,
confidence, confidence,
version, version,
implies: implies.map(({ name }) => name), implies: implies.map(({ name }) => name),

@ -557,7 +557,7 @@ const Wappalyzer = {
if (pattern.regex.test(value)) { if (pattern.regex.test(value)) {
technologies.push({ technologies.push({
technology, technology,
pattern: { ...pattern, type }, pattern: { ...pattern, type, value },
version: Wappalyzer.resolveVersion(pattern, value), version: Wappalyzer.resolveVersion(pattern, value),
}) })
} }
@ -584,7 +584,7 @@ const Wappalyzer = {
if (pattern.regex.test(value)) { if (pattern.regex.test(value)) {
technologies.push({ technologies.push({
technology, technology,
pattern: { ...pattern, type }, pattern: { ...pattern, type, value },
version: Wappalyzer.resolveVersion(pattern, value), version: Wappalyzer.resolveVersion(pattern, value),
}) })
} }
@ -621,7 +621,7 @@ const Wappalyzer = {
if (pattern.regex.test(value)) { if (pattern.regex.test(value)) {
technologies.push({ technologies.push({
technology, technology,
pattern: { ...pattern, type }, pattern: { ...pattern, type, value },
version: Wappalyzer.resolveVersion(pattern, value), version: Wappalyzer.resolveVersion(pattern, value),
}) })
} }

Loading…
Cancel
Save