icon optional and defaults to default.svg

main
Ward Oosterlijnck 8 years ago
parent e310ee3b81
commit b30e94991b

@ -12,7 +12,7 @@ var
for (app in json.apps) { for (app in json.apps) {
(function(app) { (function(app) {
var basePath = process.env.WAPPALYZER_ROOT + '/src/icons/'; var basePath = process.env.WAPPALYZER_ROOT + '/src/icons/';
var iconPath = json.apps[app].icon; var iconPath = json.apps[app].icon || 'default.svg';
var path = basePath + iconPath; var path = basePath + iconPath;
var type; var type;

@ -85,8 +85,7 @@
"required": true "required": true
}, },
"icon": { "icon": {
"type": "string", "type": "string"
"required": true
} }
} }
} }

@ -9,7 +9,6 @@
"url": "/shop/catalog/browse\\?sessid=", "url": "/shop/catalog/browse\\?sessid=",
"website": "http://1and1.com" "website": "http://1and1.com"
}, },
"1C-Bitrix": { "1C-Bitrix": {
"cats": [ "cats": [
"1" "1"
@ -866,7 +865,6 @@
"3" "3"
], ],
"html": "<!-- <h1>BigDump: Staggered MySQL Dump Importer ver\\. ([\\d.b]+)\\;version:\\1", "html": "<!-- <h1>BigDump: Staggered MySQL Dump Importer ver\\. ([\\d.b]+)\\;version:\\1",
"icon": "default.svg",
"implies": [ "implies": [
"MySQL", "MySQL",
"PHP" "PHP"
@ -951,14 +949,12 @@
"headers": { "headers": {
"Server": "Boa\\/?([\\d\\.a-z]+)?\\;version:\\1" "Server": "Boa\\/?([\\d\\.a-z]+)?\\;version:\\1"
}, },
"icon": "default.svg",
"website": "http://www.boa.org" "website": "http://www.boa.org"
}, },
"Boba.js": { "Boba.js": {
"cats": [ "cats": [
"12" "12"
], ],
"icon": "default.svg",
"implies": "Google Analytics", "implies": "Google Analytics",
"script": "boba(?:\\.min)?\\.js", "script": "boba(?:\\.min)?\\.js",
"website": "http://boba.space150.com" "website": "http://boba.space150.com"
@ -1136,7 +1132,6 @@
"cats": [ "cats": [
"1" "1"
], ],
"icon": "default.svg",
"implies": "PHP", "implies": "PHP",
"meta": { "meta": {
"generator": "CMSimple( [\\d.]+)?\\;version:\\1" "generator": "CMSimple( [\\d.]+)?\\;version:\\1"
@ -1874,7 +1869,6 @@
"headers": { "headers": {
"Server": "DECORUM(?:/([\\d.]+))?\\;version:\\1" "Server": "DECORUM(?:/([\\d.]+))?\\;version:\\1"
}, },
"icon": "default.svg",
"website": "http://example.com" "website": "http://example.com"
}, },
"DedeCMS": { "DedeCMS": {
@ -2350,7 +2344,6 @@
"25" "25"
], ],
"html": "<link[^>]+?href=\"[^\"]+epoch(?:\\.min)?\\.css", "html": "<link[^>]+?href=\"[^\"]+epoch(?:\\.min)?\\.css",
"icon": "default.svg",
"implies": "D3", "implies": "D3",
"script": "epoch(?:\\.min)?\\.js", "script": "epoch(?:\\.min)?\\.js",
"website": "http://fastly.github.io/epoch" "website": "http://fastly.github.io/epoch"
@ -2547,7 +2540,6 @@
"headers": { "headers": {
"Server": "FlashCom/?([\\d\\.]+)?\\;version:\\1" "Server": "FlashCom/?([\\d\\.]+)?\\;version:\\1"
}, },
"icon": "default.svg",
"website": "http://example.com" "website": "http://example.com"
}, },
"Flask": { "Flask": {
@ -2878,7 +2870,6 @@
"<!-- gitphp web interface ([\\d.]+)\\;version:\\1", "<!-- gitphp web interface ([\\d.]+)\\;version:\\1",
"<a href=\"http://www.gitphp.org/\" target=\"_blank\">GitPHP by Chris Han" "<a href=\"http://www.gitphp.org/\" target=\"_blank\">GitPHP by Chris Han"
], ],
"icon": "default.svg",
"implies": "PHP", "implies": "PHP",
"website": "http://gitphp.org" "website": "http://gitphp.org"
}, },
@ -2887,7 +2878,6 @@
"47" "47"
], ],
"html": "Powered by <a href=\"https://gerrit.googlesource.com/gitiles/\">Gitiles<", "html": "Powered by <a href=\"https://gerrit.googlesource.com/gitiles/\">Gitiles<",
"icon": "default.svg",
"implies": [ "implies": [
"Java", "Java",
"git" "git"
@ -3282,7 +3272,6 @@
"headers": { "headers": {
"Server": "^http-kit" "Server": "^http-kit"
}, },
"icon": "default.svg",
"implies": "Java", "implies": "Java",
"website": "http://http-kit.org" "website": "http://http-kit.org"
}, },
@ -3293,7 +3282,6 @@
"headers": { "headers": {
"Server": "(?:^|[^-])\bHTTP-Server(?: ?/?V?([\\d.]+))?\\;version:\\1" "Server": "(?:^|[^-])\bHTTP-Server(?: ?/?V?([\\d.]+))?\\;version:\\1"
}, },
"icon": "default.svg",
"website": "http://example.com" "website": "http://example.com"
}, },
"HTTP/2": { "HTTP/2": {
@ -3312,7 +3300,6 @@
"4" "4"
], ],
"html": "<p>Produced by <a href=\"http://www.haskell.org/haddock/\">Haddock</a> version ([0-9.]+)</p>\\;version:\\1", "html": "<p>Produced by <a href=\"http://www.haskell.org/haddock/\">Haddock</a> version ([0-9.]+)</p>\\;version:\\1",
"icon": "default.svg",
"script": "haddock-util\\.js", "script": "haddock-util\\.js",
"website": "http://www.haskell.org/haddock/" "website": "http://www.haskell.org/haddock/"
}, },
@ -3342,7 +3329,6 @@
"headers": { "headers": {
"Server": "Happy ICS Server(?:/([\\d.]+))?\\;version:\\1" "Server": "Happy ICS Server(?:/([\\d.]+))?\\;version:\\1"
}, },
"icon": "default.svg",
"implies": "OmniTouch 8660 My Teamwork", "implies": "OmniTouch 8660 My Teamwork",
"website": "http://example.com" "website": "http://example.com"
}, },
@ -3636,7 +3622,6 @@
"1" "1"
], ],
"html": "<(?:link|a href) [^>]+ndxz-studio", "html": "<(?:link|a href) [^>]+ndxz-studio",
"icon": "default.svg",
"implies": [ "implies": [
"PHP", "PHP",
"Apache", "Apache",
@ -3665,7 +3650,6 @@
"headers": { "headers": {
"Server": "Indy(?:/([\\d.]+))?\\;version:\\1" "Server": "Indy(?:/([\\d.]+))?\\;version:\\1"
}, },
"icon": "default.svg",
"website": "http://indyproject.org" "website": "http://indyproject.org"
}, },
"InfernoJS": { "InfernoJS": {
@ -4194,7 +4178,6 @@
"headers": { "headers": {
"X-Powered-By": "Kolibri" "X-Powered-By": "Kolibri"
}, },
"icon": "default.svg",
"meta": { "meta": {
"generator": "Kolibri" "generator": "Kolibri"
}, },
@ -4289,7 +4272,6 @@
"cats": [ "cats": [
"12" "12"
], ],
"icon": "default.svg",
"script": "lazy(?:\\.browser)?(?:\\.min)?\\.js", "script": "lazy(?:\\.browser)?(?:\\.min)?\\.js",
"website": "http://danieltao.com/lazy.js" "website": "http://danieltao.com/lazy.js"
}, },
@ -4987,7 +4969,6 @@
"headers": { "headers": {
"Server": "MiniServ\\/?([\\d\\.]+)?\\;version:\\1" "Server": "MiniServ\\/?([\\d\\.]+)?\\;version:\\1"
}, },
"icon": "default.svg",
"website": "http://sourceforge.net/projects/miniserv" "website": "http://sourceforge.net/projects/miniserv"
}, },
"Mint": { "Mint": {
@ -5033,7 +5014,6 @@
"headers": { "headers": {
"Server": "MochiWeb(?:/([\\d.]+))?\\;version:\\1" "Server": "MochiWeb(?:/([\\d.]+))?\\;version:\\1"
}, },
"icon": "default.svg",
"website": "http://github.com/mochi/mochiweb" "website": "http://github.com/mochi/mochiweb"
}, },
"Modernizr": { "Modernizr": {
@ -5204,7 +5184,6 @@
"headers": { "headers": {
"Server": "Motion-httpd(?:/([\\d.]+))?\\;version:\\1" "Server": "Motion-httpd(?:/([\\d.]+))?\\;version:\\1"
}, },
"icon": "default.svg",
"website": "http://lavrsen.dk/foswiki/bin/view/Motion" "website": "http://lavrsen.dk/foswiki/bin/view/Motion"
}, },
"MotoCMS": { "MotoCMS": {
@ -5467,7 +5446,6 @@
"script": "^/nodebb\\.min\\.js\\?", "script": "^/nodebb\\.min\\.js\\?",
"website": "https://nodebb.org" "website": "https://nodebb.org"
}, },
"OWL Carousel": { "OWL Carousel": {
"cats": [ "cats": [
"5", "5",
@ -5945,7 +5923,6 @@
"cats": [ "cats": [
"25" "25"
], ],
"icon": "default.svg",
"script": "paths(?:\\.min)?\\.js", "script": "paths(?:\\.min)?\\.js",
"website": "http://github.com/andreaferretti/paths-js" "website": "http://github.com/andreaferretti/paths-js"
}, },
@ -6298,7 +6275,6 @@
"25" "25"
], ],
"env": "^protovis$", "env": "^protovis$",
"icon": "default.svg",
"script": "protovis.*\\.js", "script": "protovis.*\\.js",
"website": "http://mbostock.github.com/protovis" "website": "http://mbostock.github.com/protovis"
}, },
@ -6433,7 +6409,6 @@
"headers": { "headers": {
"Server": "RAID HTTPServer(?:/([\\d.]+))?\\;version:\\1" "Server": "RAID HTTPServer(?:/([\\d.]+))?\\;version:\\1"
}, },
"icon": "default.svg",
"website": "http://example.com" "website": "http://example.com"
}, },
"RBS Change": { "RBS Change": {
@ -6543,7 +6518,6 @@
"headers": { "headers": {
"Server": "Rapid Logic(?:/([\\d.]+))?\\;version:\\1" "Server": "Rapid Logic(?:/([\\d.]+))?\\;version:\\1"
}, },
"icon": "default.svg",
"website": "http://example.com" "website": "http://example.com"
}, },
"React": { "React": {
@ -6647,7 +6621,6 @@
"25" "25"
], ],
"env": "^Rickshaw$", "env": "^Rickshaw$",
"icon": "default.svg",
"implies": "D3", "implies": "D3",
"script": "rickshaw(?:\\.min)?\\.js", "script": "rickshaw(?:\\.min)?\\.js",
"website": "http://code.shutterstock.com/rickshaw/" "website": "http://code.shutterstock.com/rickshaw/"
@ -7017,7 +6990,6 @@
"cats": [ "cats": [
"12" "12"
], ],
"icon": "default.svg",
"implies": "jQuery", "implies": "jQuery",
"script": "select2.*\\.js", "script": "select2.*\\.js",
"website": "http://select2.github.io" "website": "http://select2.github.io"
@ -7236,7 +7208,6 @@
"headers": { "headers": {
"Server": "SimpleHTTP(?:/([\\d.]+))?\\;version:\\1" "Server": "SimpleHTTP(?:/([\\d.]+))?\\;version:\\1"
}, },
"icon": "default.svg",
"website": "http://example.com" "website": "http://example.com"
}, },
"Site Meter": { "Site Meter": {
@ -8101,7 +8072,6 @@
"25" "25"
], ],
"env": "^twemoji$", "env": "^twemoji$",
"icon": "default.svg",
"script": "twemoji(?:\\.min)?\\.js", "script": "twemoji(?:\\.min)?\\.js",
"website": "http://twitter.github.io/twemoji/" "website": "http://twitter.github.io/twemoji/"
}, },
@ -8412,7 +8382,6 @@
"headers": { "headers": {
"Server": "Virata-EmWeb(?:/(R?[\\d._]+))?\\;version:\\1" "Server": "Virata-EmWeb(?:/(R?[\\d._]+))?\\;version:\\1"
}, },
"icon": "default.svg",
"implies": [ "implies": [
"HP" "HP"
], ],
@ -8719,7 +8688,6 @@
"Server": "Winstone Servlet (?:Container|Engine) v?([\\d.]+)?\\;version:\\1", "Server": "Winstone Servlet (?:Container|Engine) v?([\\d.]+)?\\;version:\\1",
"X-Powered-By": "Winstone(?:.([\\d.]+))?\\;version:\\1" "X-Powered-By": "Winstone(?:.([\\d.]+))?\\;version:\\1"
}, },
"icon": "default.svg",
"website": "http://winstone.sourceforge.net" "website": "http://winstone.sourceforge.net"
}, },
"Wix": { "Wix": {
@ -9307,7 +9275,6 @@
"headers": { "headers": {
"Server": "dwhttpd\\/?([\\d\\.a-z]+)?\\;version:\\1" "Server": "dwhttpd\\/?([\\d\\.a-z]+)?\\;version:\\1"
}, },
"icon": "default.svg",
"website": "http://example.com" "website": "http://example.com"
}, },
"e107": { "e107": {
@ -9340,7 +9307,6 @@
"headers": { "headers": {
"Server": "\beHTTP(?: v?([\\d\\.]+))?\\;version:\\1" "Server": "\beHTTP(?: v?([\\d\\.]+))?\\;version:\\1"
}, },
"icon": "default.svg",
"implies": "HP ProCurve", "implies": "HP ProCurve",
"website": "http://example.com" "website": "http://example.com"
}, },
@ -9402,7 +9368,6 @@
"47" "47"
], ],
"html": "<p>Powered by <a[^>]+>GitList ([\\d.]+)\\;version:\\1", "html": "<p>Powered by <a[^>]+>GitList ([\\d.]+)\\;version:\\1",
"icon": "default.svg",
"implies": [ "implies": [
"PHP", "PHP",
"git" "git"
@ -9537,7 +9502,6 @@
"cats": [ "cats": [
"25" "25"
], ],
"icon": "default.svg",
"implies": "jQuery", "implies": "jQuery",
"script": "jquery\\.sparkline.*\\.js", "script": "jquery\\.sparkline.*\\.js",
"website": "http://omnipotent.net/jquery.sparkline/" "website": "http://omnipotent.net/jquery.sparkline/"
@ -9983,7 +9947,6 @@
"25" "25"
], ],
"env": "^Shine$", "env": "^Shine$",
"icon": "default.svg",
"script": "shine(?:\\.min)?\\.js", "script": "shine(?:\\.min)?\\.js",
"website": "http://bigspaceship.github.io/shine.js/" "website": "http://bigspaceship.github.io/shine.js/"
}, },
@ -10091,7 +10054,6 @@
"1" "1"
], ],
"html": "powered by <a href=\"[^>]+viennacms", "html": "powered by <a href=\"[^>]+viennacms",
"icon": "default.svg",
"website": "http://www.viennacms.nl" "website": "http://www.viennacms.nl"
}, },
"webEdition": { "webEdition": {
@ -10135,7 +10097,6 @@
], ],
"env": "^xChart$", "env": "^xChart$",
"html": "<link[^>]* href=\"[^\"]*xcharts(?:\\.min)?\\.css", "html": "<link[^>]* href=\"[^\"]*xcharts(?:\\.min)?\\.css",
"icon": "default.svg",
"implies": "D3", "implies": "D3",
"script": "xcharts\\.js", "script": "xcharts\\.js",
"website": "http://tenxer.github.io/xcharts/" "website": "http://tenxer.github.io/xcharts/"

@ -112,7 +112,7 @@
'<div class="wappalyzer-app' + ( first ? ' wappalyzer-first' : '' ) + '">' + '<div class="wappalyzer-app' + ( first ? ' wappalyzer-first' : '' ) + '">' +
'<a target="_blank" class="wappalyzer-application" href="' + w.config.websiteURL + 'applications/' + app.toLowerCase().replace(/ /g, '-').replace(/[^a-z0-9-]/g, '') + '">' + '<a target="_blank" class="wappalyzer-application" href="' + w.config.websiteURL + 'applications/' + app.toLowerCase().replace(/ /g, '-').replace(/[^a-z0-9-]/g, '') + '">' +
'<strong>' + '<strong>' +
'<img src="' + w.config.websiteURL + 'images/icons/' + w.apps[app].icon + '" width="16" height="16"/> ' + app + '<img src="' + w.config.websiteURL + 'images/icons/' + (w.apps[app].icon || 'default.svg') + '" width="16" height="16"/> ' + app +
'</strong>' + '</strong>' +
'</a>'; '</a>';

@ -88,7 +88,7 @@
name: app, name: app,
confidence: wappalyzer.detected[url][app].confidenceTotal.toString(), confidence: wappalyzer.detected[url][app].confidenceTotal.toString(),
version: wappalyzer.detected[url][app].version, version: wappalyzer.detected[url][app].version,
icon: wappalyzer.apps[app].icon, icon: wappalyzer.apps[app].icon || 'default.svg',
website: wappalyzer.apps[app].website, website: wappalyzer.apps[app].website,
categories: cats categories: cats
}); });

@ -208,7 +208,7 @@
w.driver.categoryOrder.forEach(function(match) { w.driver.categoryOrder.forEach(function(match) {
for ( appName in w.detected[url] ) { for ( appName in w.detected[url] ) {
w.apps[appName].cats.forEach(function(cat) { w.apps[appName].cats.forEach(function(cat) {
var icon = w.apps[appName].icon; var icon = w.apps[appName].icon || 'default.svg';
if ( cat == match && !found ) { if ( cat == match && !found ) {
if ( /\.svg$/i.test(icon) ) { if ( /\.svg$/i.test(icon) ) {

@ -36,7 +36,7 @@ document.addEventListener('DOMContentLoaded', function() {
html = html =
'<div class="detected-app">' + '<div class="detected-app">' +
'<a target="_blank" href="https://wappalyzer.com/applications/' + slugify(appName) + '">' + '<a target="_blank" href="https://wappalyzer.com/applications/' + slugify(appName) + '">' +
'<img src="images/icons/' + response.apps[appName].icon + '"/>' + '<img src="images/icons/' + (response.apps[appName].icon || 'default.svg') + '"/>' +
'<span class="label"><span class="name">' + appName + '</span>' + ( version ? ' ' + version : '' ) + ( confidence < 100 ? ' (' + confidence + '% sure)' : '' ) + '</span>' + '<span class="label"><span class="name">' + appName + '</span>' + ( version ? ' ' + version : '' ) + ( confidence < 100 ? ' (' + confidence + '% sure)' : '' ) + '</span>' +
'</a>'; '</a>';