From a0cc689e1dff9a96baf3d0488433b89d320fb062 Mon Sep 17 00:00:00 2001 From: Elbert Alias <77259+AliasIO@users.noreply.github.com> Date: Sun, 20 May 2018 15:01:11 +1000 Subject: [PATCH] Hide technologies with 0 confidence, fix Underscore.js and Lodash always being detected together --- src/apps.json | 8 ++++++-- src/wappalyzer.js | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/apps.json b/src/apps.json index afe39343f..092aeb39a 100644 --- a/src/apps.json +++ b/src/apps.json @@ -5391,14 +5391,16 @@ "script": "/js/al/common\\.js\\?[0-9_]+", "website": "http://liveinternet.ru/rating/" }, - "Lo-dash": { + "Lodash": { "cats": [ 12 ], "icon": "Lo-dash.png", "js": { - "_.VERSION": "(.*)\\;version:\\1" + "_.differenceBy": "", + "_.VERSION": "(.*)\\;confidence:0\\;version:\\1" }, + "excludes": "Underscore.js", "script": "lodash.*\\.js", "website": "http://www.lodash.com" }, @@ -10041,8 +10043,10 @@ ], "icon": "Underscore.js.png", "js": { + "_.restArguments": "", "_.VERSION": "(.*)\\;version:\\1" }, + "exludes": "Lodash", "script": "underscore.*\\.js(?:\\?ver=([\\d.]+))?\\;version:\\1", "website": "http://underscorejs.org" }, diff --git a/src/wappalyzer.js b/src/wappalyzer.js index c2c26c4cc..7735819d9 100644 --- a/src/wappalyzer.js +++ b/src/wappalyzer.js @@ -333,7 +333,7 @@ class Wappalyzer { // Apply app confidence to implied app Object.keys(app.confidence).forEach(id => { - apps[implied.string].confidence[id + ' implied by ' + appName] = app.confidence[id] * ( implied.confidence ? implied.confidence / 100 : 1 ); + apps[implied.string].confidence[id + ' implied by ' + appName] = app.confidence[id] * ( implied.confidence === undefined ? 1 : implied.confidence / 100 ); }); }); } @@ -568,7 +568,7 @@ class Wappalyzer { app.detected = true; // Set confidence level - app.confidence[type + ' ' + ( key ? key + ' ' : '' ) + pattern.regex] = pattern.confidence || 100; + app.confidence[type + ' ' + ( key ? key + ' ' : '' ) + pattern.regex] = pattern.confidence === undefined ? 100 : pattern.confidence; // Detect version number if ( pattern.version ) {