Fix JavaScript detection

main
Elbert Alias 4 years ago
parent fe1d1ce064
commit 83bce62ef4

@ -7,7 +7,7 @@ after_success:
script: 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 && echo Version is $version &&
yarn run build $version && yarn run build $version &&
docker build -t wappalyzer/cli:latest -t wappalyzer/cli:$version src/drivers/npm docker build -t wappalyzer/cli:latest -t wappalyzer/cli:$version src/drivers/npm

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

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

Loading…
Cancel
Save