Hide technologies with 0 confidence, fix Underscore.js and Lodash always being detected together

main
Elbert Alias 7 years ago
parent 02357b2192
commit a0cc689e1d

@ -5391,14 +5391,16 @@
"script": "/js/al/common\\.js\\?[0-9_]+", "script": "/js/al/common\\.js\\?[0-9_]+",
"website": "http://liveinternet.ru/rating/" "website": "http://liveinternet.ru/rating/"
}, },
"Lo-dash": { "Lodash": {
"cats": [ "cats": [
12 12
], ],
"icon": "Lo-dash.png", "icon": "Lo-dash.png",
"js": { "js": {
"_.VERSION": "(.*)\\;version:\\1" "_.differenceBy": "",
"_.VERSION": "(.*)\\;confidence:0\\;version:\\1"
}, },
"excludes": "Underscore.js",
"script": "lodash.*\\.js", "script": "lodash.*\\.js",
"website": "http://www.lodash.com" "website": "http://www.lodash.com"
}, },
@ -10041,8 +10043,10 @@
], ],
"icon": "Underscore.js.png", "icon": "Underscore.js.png",
"js": { "js": {
"_.restArguments": "",
"_.VERSION": "(.*)\\;version:\\1" "_.VERSION": "(.*)\\;version:\\1"
}, },
"exludes": "Lodash",
"script": "underscore.*\\.js(?:\\?ver=([\\d.]+))?\\;version:\\1", "script": "underscore.*\\.js(?:\\?ver=([\\d.]+))?\\;version:\\1",
"website": "http://underscorejs.org" "website": "http://underscorejs.org"
}, },

@ -333,7 +333,7 @@ class Wappalyzer {
// Apply app confidence to implied app // Apply app confidence to implied app
Object.keys(app.confidence).forEach(id => { 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; app.detected = true;
// Set confidence level // 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 // Detect version number
if ( pattern.version ) { if ( pattern.version ) {