Fix JavaScript detection

main
Elbert Alias 4 years ago
parent fe1d1ce064
commit 83bce62ef4

@ -7,7 +7,7 @@ after_success:
script:
- >-
version=$(grep '"version":' src/drivers/webextension/manifest.json | sed 's/^.*"version": "\(.*\)".*$/\1/') &&
version=$(grep '"version":' src/package.json | sed 's/^.*"version": "\(.*\)".*$/\1/') &&
echo Version is $version &&
yarn run build $version &&
docker build -t wappalyzer/cli:latest -t wappalyzer/cli:$version src/drivers/npm

@ -25,6 +25,10 @@
window
)
if (name === 'Intercom') {
console.log(name, chains, value)
}
if (value !== undefined) {
technologies.push({
name,

@ -236,7 +236,7 @@ const Wappalyzer = {
html: transform(html),
meta: transform(meta),
scripts: transform(script),
js: transform(js),
js: transform(js, true),
implies: transform(implies).map(({ value, confidence }) => ({
name: value,
confidence
@ -276,7 +276,7 @@ const Wappalyzer = {
* Extract information from regex pattern.
* @param {string|array} patterns
*/
transformPatterns(patterns) {
transformPatterns(patterns, caseSensitive = false) {
if (!patterns) {
return []
}
@ -288,7 +288,9 @@ const Wappalyzer = {
}
const parsed = Object.keys(patterns).reduce((parsed, key) => {
parsed[key.toLowerCase()] = toArray(patterns[key]).map((pattern) => {
parsed[caseSensitive ? key : key.toLowerCase()] = toArray(
patterns[key]
).map((pattern) => {
const { value, regex, confidence, version } = pattern
.split('\\;')
.reduce((attrs, attr, i) => {

Loading…
Cancel
Save