From 5f629ad25a24694e6b1ab7bb60b8b5b565846d09 Mon Sep 17 00:00:00 2001 From: Elbert Alias <77259+AliasIO@users.noreply.github.com> Date: Mon, 24 Jan 2022 09:21:19 +1100 Subject: [PATCH] Output matched value in extended output --- src/drivers/npm/driver.js | 3 ++- src/wappalyzer.js | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/drivers/npm/driver.js b/src/drivers/npm/driver.js index b2475823a..51f180350 100644 --- a/src/drivers/npm/driver.js +++ b/src/drivers/npm/driver.js @@ -998,7 +998,7 @@ class Site { patterns, { technology: { name, implies, excludes }, - pattern: { regex, confidence, type, version }, + pattern: { regex, value, confidence, type, version }, } ) => { patterns[name] = patterns[name] || [] @@ -1006,6 +1006,7 @@ class Site { patterns[name].push({ type, regex: regex.source, + value: value.length <= 250 ? value : null, confidence, version, implies: implies.map(({ name }) => name), diff --git a/src/wappalyzer.js b/src/wappalyzer.js index 22db3e680..2d41342f5 100644 --- a/src/wappalyzer.js +++ b/src/wappalyzer.js @@ -557,7 +557,7 @@ const Wappalyzer = { if (pattern.regex.test(value)) { technologies.push({ technology, - pattern: { ...pattern, type }, + pattern: { ...pattern, type, value }, version: Wappalyzer.resolveVersion(pattern, value), }) } @@ -584,7 +584,7 @@ const Wappalyzer = { if (pattern.regex.test(value)) { technologies.push({ technology, - pattern: { ...pattern, type }, + pattern: { ...pattern, type, value }, version: Wappalyzer.resolveVersion(pattern, value), }) } @@ -621,7 +621,7 @@ const Wappalyzer = { if (pattern.regex.test(value)) { technologies.push({ technology, - pattern: { ...pattern, type }, + pattern: { ...pattern, type, value }, version: Wappalyzer.resolveVersion(pattern, value), }) }