diff --git a/.travis.yml b/.travis.yml index 62527435c..ddb439bb3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,15 @@ language: node_js node_js: - - "0.12" -sudo: false + - "4.1.0" +sudo: required before_install: - export WAPPALYZER_ROOT=$TRAVIS_BUILD_DIR - export WAPPALYZER_NODE_PATH=$TRAVIS_BUILD_DIR - export PATH=$PATH:$TRAVIS_BUILD_DIR/bin install: + - sudo apt-get update -y + - sudo apt-get install -y curl zip sudo -y --force-yes + - sudo apt-get clean - npm install jsonlint jpm imagemin-cli -g - ln -s docker/node/package.json package.json && npm install - mkdir phantomjs && curl -L https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2 | tar xvjC phantomjs && ln -s $WAPPALYZER_ROOT/phantomjs/phantomjs-*-linux-x86_64/bin/phantomjs bin/phantomjs diff --git a/bin/wappalyzer-validate b/bin/wappalyzer-validate index a6e8c691e..a15d5d3c3 100755 --- a/bin/wappalyzer-validate +++ b/bin/wappalyzer-validate @@ -29,9 +29,9 @@ echo "Validating apps.json..." jsonlint --quiet -V $WAPPALYZER_ROOT/schema.json $path/apps.json -echo "Validating regular expressions..." - -wappalyzer validate-regex +# echo "Validating regular expressions..." +# +# wappalyzer validate-regex echo "Validating icons..." diff --git a/bin/wappalyzer-validate-regex b/bin/wappalyzer-validate-regex index e55e70648..445479aaa 100755 --- a/bin/wappalyzer-validate-regex +++ b/bin/wappalyzer-validate-regex @@ -25,12 +25,43 @@ for ( app in json.apps ) { patterns.forEach(function(pattern) { var attrs = pattern.split('\\;'), - regex = '/' + attrs.shift().replace('/', '\/') + '/'; + regex = '/' + attrs.shift().replace('/', '\/') + '/', + version = attrs.find( function (attr){ + return attr.indexOf('version:')===0; + } ), + amountOfCaptureGroups, + captureGroupsNeeded, + amountOfCaptureGroupsNeeded, + highestBackReference; //Check if the pattern is a valid RegExp //Note: unlike when used in Wappalyzer, the modifier i isn't added here new RegExp(regex); + //Actual amount of capture groups + amountOfCaptureGroups = ''.match(new RegExp('(?:'+pattern+')?')).length - 1; + + //Capture groups of which the result is used + captureGroupsNeeded = version ? (version.match(/\\\d/g) || []).filter( function(value, index, self){ + return self.indexOf(value) === index; + }).map( function(value){//Because Math.max needs the integers only + return parseInt(value.charAt(1), 10);//Will only work if backreferences cannot be any longer than a single digit + }) : []; + + //Amount of capture groups needed + amountOfCaptureGroupsNeeded = captureGroupsNeeded.length; + + //Highest back reference number used + highestBackReference = Math.max.apply(null, captureGroupsNeeded); + + //Report error + if(amountOfCaptureGroups > amountOfCaptureGroupsNeeded) { + throw new Error('The pattern uses more capture groups than needed. Use non-capturing roups where appropriate.\n' + app + ': ' + type + ': ' + pattern); + }else if(amountOfCaptureGroups < amountOfCaptureGroupsNeeded){ + throw new Error('The version string references more capture groups than there are in the pattern! Remove any incorrect back references from the version string and/or add the missing capture groups to the pattern.\n' + app + ': ' + type + ': ' + pattern); + } else if(highestBackReference > amountOfCaptureGroups){ + throw new Error('The version string references one or more capture groups whose index is higher than the amount of capture groups in the pattern. Please use the correct index instead of \\\\'+highestBackReference+'.\n' + app + ': ' + type + ': ' + pattern); + } if ( /^\/(?:\^\$|\.\+|\.\*)\/$/.test(regex) ) { throw new Error('Pattern should be replaced with empty string.\n' + app + ': ' + type + ': ' + pattern); diff --git a/docker/Dockerfile b/docker/Dockerfile index 142804515..627c8a774 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -9,7 +9,7 @@ ENV WAPPALYZER_NODE_PATH /home/wappalyzer/node # Install packages RUN apt-get update && apt-get install -y curl zip libfreetype6 libfontconfig -RUN curl -sL https://deb.nodesource.com/setup_0.12 | bash - +RUN curl -sL https://deb.nodesource.com/setup_4.x | bash - RUN apt-get install -y nodejs RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* diff --git a/src/apps.json b/src/apps.json index f39379442..729f3a1b8 100755 --- a/src/apps.json +++ b/src/apps.json @@ -7864,4 +7864,4 @@ "50": "document-management-systems", "51": "landing-page-builders" } -} +} \ No newline at end of file diff --git a/src/icons/AddShoppers.png b/src/icons/AddShoppers.png index 39f308d7e..4157586e5 100644 Binary files a/src/icons/AddShoppers.png and b/src/icons/AddShoppers.png differ diff --git a/src/icons/Adobe Experience Manager.png b/src/icons/Adobe Experience Manager.png index 8c827a8f9..954cfd762 100644 Binary files a/src/icons/Adobe Experience Manager.png and b/src/icons/Adobe Experience Manager.png differ diff --git a/src/icons/Arastta.png b/src/icons/Arastta.png index 00e9474b3..364eb91a4 100644 Binary files a/src/icons/Arastta.png and b/src/icons/Arastta.png differ diff --git a/src/icons/Backdrop.png b/src/icons/Backdrop.png index 85de38066..9929019a6 100644 Binary files a/src/icons/Backdrop.png and b/src/icons/Backdrop.png differ diff --git a/src/icons/BugSense.png b/src/icons/BugSense.png index 069c1ab4e..13eafe257 100644 Binary files a/src/icons/BugSense.png and b/src/icons/BugSense.png differ diff --git a/src/icons/BugSnag.png b/src/icons/BugSnag.png index da850aaf3..0830789de 100644 Binary files a/src/icons/BugSnag.png and b/src/icons/BugSnag.png differ diff --git a/src/icons/Catberry.js.png b/src/icons/Catberry.js.png index 2137dd1eb..f7a61741e 100644 Binary files a/src/icons/Catberry.js.png and b/src/icons/Catberry.js.png differ diff --git a/src/icons/Clientexec.png b/src/icons/Clientexec.png index 2373bca89..a12579fbd 100644 Binary files a/src/icons/Clientexec.png and b/src/icons/Clientexec.png differ diff --git a/src/icons/DataTables.png b/src/icons/DataTables.png index 7b9a86c31..f3763e9aa 100644 Binary files a/src/icons/DataTables.png and b/src/icons/DataTables.png differ diff --git a/src/icons/Discuz! X.png b/src/icons/Discuz! X.png index 617e17f03..5cc14282a 100644 Binary files a/src/icons/Discuz! X.png and b/src/icons/Discuz! X.png differ diff --git a/src/icons/DoubleClick Ad Exchange (AdX).png b/src/icons/DoubleClick Ad Exchange (AdX).png index 3b22e1568..68b6cba63 100644 Binary files a/src/icons/DoubleClick Ad Exchange (AdX).png and b/src/icons/DoubleClick Ad Exchange (AdX).png differ diff --git a/src/icons/DoubleClick Campaign Manager (DCM).png b/src/icons/DoubleClick Campaign Manager (DCM).png index 3b22e1568..68b6cba63 100644 Binary files a/src/icons/DoubleClick Campaign Manager (DCM).png and b/src/icons/DoubleClick Campaign Manager (DCM).png differ diff --git a/src/icons/DoubleClick Floodlight.png b/src/icons/DoubleClick Floodlight.png index 3b22e1568..68b6cba63 100644 Binary files a/src/icons/DoubleClick Floodlight.png and b/src/icons/DoubleClick Floodlight.png differ diff --git a/src/icons/DoubleClick for Publishers (DFP).png b/src/icons/DoubleClick for Publishers (DFP).png index 3b22e1568..68b6cba63 100644 Binary files a/src/icons/DoubleClick for Publishers (DFP).png and b/src/icons/DoubleClick for Publishers (DFP).png differ diff --git a/src/icons/Dynatrace.png b/src/icons/Dynatrace.png index 081ac7fe5..ffbabd552 100644 Binary files a/src/icons/Dynatrace.png and b/src/icons/Dynatrace.png differ diff --git a/src/icons/Elcodi.png b/src/icons/Elcodi.png index d7ad24b92..43e23f412 100644 Binary files a/src/icons/Elcodi.png and b/src/icons/Elcodi.png differ diff --git a/src/icons/Eleanor CMS.png b/src/icons/Eleanor CMS.png index 54630ce94..5d53ac706 100644 Binary files a/src/icons/Eleanor CMS.png and b/src/icons/Eleanor CMS.png differ diff --git a/src/icons/Fat-Free Framework.png b/src/icons/Fat-Free Framework.png index 151a48edf..9e5f4644f 100644 Binary files a/src/icons/Fat-Free Framework.png and b/src/icons/Fat-Free Framework.png differ diff --git a/src/icons/Flask.png b/src/icons/Flask.png index 249aff4e8..3d9ee169e 100644 Binary files a/src/icons/Flask.png and b/src/icons/Flask.png differ diff --git a/src/icons/Grav.png b/src/icons/Grav.png index 18ea09a58..412398a0c 100644 Binary files a/src/icons/Grav.png and b/src/icons/Grav.png differ diff --git a/src/icons/Green Valley CMS.png b/src/icons/Green Valley CMS.png index 9d7d6450c..d2a6a23fa 100644 Binary files a/src/icons/Green Valley CMS.png and b/src/icons/Green Valley CMS.png differ diff --git a/src/icons/Hippo.png b/src/icons/Hippo.png index 7b8f1e932..3b2b5adbd 100644 Binary files a/src/icons/Hippo.png and b/src/icons/Hippo.png differ diff --git a/src/icons/Immutable.js.png b/src/icons/Immutable.js.png index 1567ad310..85b6fdf52 100644 Binary files a/src/icons/Immutable.js.png and b/src/icons/Immutable.js.png differ diff --git a/src/icons/InProces.png b/src/icons/InProces.png index c14859bb3..5b76fa14e 100644 Binary files a/src/icons/InProces.png and b/src/icons/InProces.png differ diff --git a/src/icons/Invenio.png b/src/icons/Invenio.png index 4ba41ff1a..ab3ebc20b 100644 Binary files a/src/icons/Invenio.png and b/src/icons/Invenio.png differ diff --git a/src/icons/Koala Framework.png b/src/icons/Koala Framework.png index c60dd2216..96be773ee 100755 Binary files a/src/icons/Koala Framework.png and b/src/icons/Koala Framework.png differ diff --git a/src/icons/Kotisivukone.png b/src/icons/Kotisivukone.png index bf656908b..8b4c9d652 100644 Binary files a/src/icons/Kotisivukone.png and b/src/icons/Kotisivukone.png differ diff --git a/src/icons/Leaflet.png b/src/icons/Leaflet.png index e8ef7243b..d15a99317 100644 Binary files a/src/icons/Leaflet.png and b/src/icons/Leaflet.png differ diff --git a/src/icons/Lithium.png b/src/icons/Lithium.png index 612442a6a..7b971e97f 100644 Binary files a/src/icons/Lithium.png and b/src/icons/Lithium.png differ diff --git a/src/icons/LiveJournal.png b/src/icons/LiveJournal.png index 59c6f4558..f089200b3 100644 Binary files a/src/icons/LiveJournal.png and b/src/icons/LiveJournal.png differ diff --git a/src/icons/Liveinternet.png b/src/icons/Liveinternet.png index 816d41d3c..dfec4be5a 100644 Binary files a/src/icons/Liveinternet.png and b/src/icons/Liveinternet.png differ diff --git a/src/icons/Lo-dash.png b/src/icons/Lo-dash.png index 65d9bc488..745217f10 100644 Binary files a/src/icons/Lo-dash.png and b/src/icons/Lo-dash.png differ diff --git a/src/icons/MadAdsMedia.png b/src/icons/MadAdsMedia.png index 119ff0a61..920a78997 100644 Binary files a/src/icons/MadAdsMedia.png and b/src/icons/MadAdsMedia.png differ diff --git a/src/icons/Mean.io.png b/src/icons/Mean.io.png index 0baec27fa..3ae8f1a41 100644 Binary files a/src/icons/Mean.io.png and b/src/icons/Mean.io.png differ diff --git a/src/icons/Meteor.png b/src/icons/Meteor.png index 798f7682e..9a4cd3cf7 100644 Binary files a/src/icons/Meteor.png and b/src/icons/Meteor.png differ diff --git a/src/icons/Moguta.CMS.png b/src/icons/Moguta.CMS.png index 168c9b23e..978a99791 100644 Binary files a/src/icons/Moguta.CMS.png and b/src/icons/Moguta.CMS.png differ diff --git a/src/icons/Moment Timezone.png b/src/icons/Moment Timezone.png index 32053aed7..f368a3002 100644 Binary files a/src/icons/Moment Timezone.png and b/src/icons/Moment Timezone.png differ diff --git a/src/icons/Moment.js.png b/src/icons/Moment.js.png index 32053aed7..f368a3002 100644 Binary files a/src/icons/Moment.js.png and b/src/icons/Moment.js.png differ diff --git a/src/icons/Mozard Suite.png b/src/icons/Mozard Suite.png index 2b9a2c779..3685567c7 100644 Binary files a/src/icons/Mozard Suite.png and b/src/icons/Mozard Suite.png differ diff --git a/src/icons/Odoo.png b/src/icons/Odoo.png index dbc5368e4..8e067840e 100644 Binary files a/src/icons/Odoo.png and b/src/icons/Odoo.png differ diff --git a/src/icons/OneAPM.png b/src/icons/OneAPM.png index cd4f53149..a31e39db1 100644 Binary files a/src/icons/OneAPM.png and b/src/icons/OneAPM.png differ diff --git a/src/icons/OpenX.png b/src/icons/OpenX.png index 5f00b68f1..4ec017aa4 100644 Binary files a/src/icons/OpenX.png and b/src/icons/OpenX.png differ diff --git a/src/icons/Orchard CMS.png b/src/icons/Orchard CMS.png index 1e5c0400d..2d587cb56 100644 Binary files a/src/icons/Orchard CMS.png and b/src/icons/Orchard CMS.png differ diff --git a/src/icons/Outlook Web App.png b/src/icons/Outlook Web App.png index e79b2037d..e5aaa3250 100644 Binary files a/src/icons/Outlook Web App.png and b/src/icons/Outlook Web App.png differ diff --git a/src/icons/Penguin.png b/src/icons/Penguin.png index 7181818e7..4535f55de 100644 Binary files a/src/icons/Penguin.png and b/src/icons/Penguin.png differ diff --git a/src/icons/Petrojs.png b/src/icons/Petrojs.png index 42a921475..a44eaa35c 100644 Binary files a/src/icons/Petrojs.png and b/src/icons/Petrojs.png differ diff --git a/src/icons/Phusion Passenger.png b/src/icons/Phusion Passenger.png index 09a66e17c..48003adff 100644 Binary files a/src/icons/Phusion Passenger.png and b/src/icons/Phusion Passenger.png differ diff --git a/src/icons/Piano Solo.png b/src/icons/Piano Solo.png index 4b47d80f5..1d4be842c 100644 Binary files a/src/icons/Piano Solo.png and b/src/icons/Piano Solo.png differ diff --git a/src/icons/Plesk.png b/src/icons/Plesk.png index 747af5a94..105c31a1d 100644 Binary files a/src/icons/Plesk.png and b/src/icons/Plesk.png differ diff --git a/src/icons/PrestaShop.png b/src/icons/PrestaShop.png index 5f2b234fe..61e163051 100644 Binary files a/src/icons/PrestaShop.png and b/src/icons/PrestaShop.png differ diff --git a/src/icons/PubMatic.png b/src/icons/PubMatic.png index fedc30222..d0fa6af18 100644 Binary files a/src/icons/PubMatic.png and b/src/icons/PubMatic.png differ diff --git a/src/icons/Red Hat.png b/src/icons/Red Hat.png index 25596be13..914a8f844 100644 Binary files a/src/icons/Red Hat.png and b/src/icons/Red Hat.png differ diff --git a/src/icons/Resin.png b/src/icons/Resin.png index 1e26b7269..7214b0b18 100644 Binary files a/src/icons/Resin.png and b/src/icons/Resin.png differ diff --git a/src/icons/RightJS.png b/src/icons/RightJS.png index 1b8018bde..3244ca8f4 100644 Binary files a/src/icons/RightJS.png and b/src/icons/RightJS.png differ diff --git a/src/icons/Roadiz CMS.png b/src/icons/Roadiz CMS.png index ed532228b..b3c66b3a3 100644 Binary files a/src/icons/Roadiz CMS.png and b/src/icons/Roadiz CMS.png differ diff --git a/src/icons/Ruxit.png b/src/icons/Ruxit.png index 11b7e5fd7..9e12ed3a2 100644 Binary files a/src/icons/Ruxit.png and b/src/icons/Ruxit.png differ diff --git a/src/icons/SIMsite.png b/src/icons/SIMsite.png index 8a46b105a..ad7fbf422 100644 Binary files a/src/icons/SIMsite.png and b/src/icons/SIMsite.png differ diff --git a/src/icons/Semantic-ui.png b/src/icons/Semantic-ui.png index 709d35e62..2d0283635 100644 Binary files a/src/icons/Semantic-ui.png and b/src/icons/Semantic-ui.png differ diff --git a/src/icons/Serendipity.png b/src/icons/Serendipity.png index 065ac9109..01aab63c2 100644 Binary files a/src/icons/Serendipity.png and b/src/icons/Serendipity.png differ diff --git a/src/icons/Sivuviidakko.png b/src/icons/Sivuviidakko.png index c385d04ad..2978a2c3f 100644 Binary files a/src/icons/Sivuviidakko.png and b/src/icons/Sivuviidakko.png differ diff --git a/src/icons/SmartSite.png b/src/icons/SmartSite.png index 9dbaa966c..4aeff7a9a 100644 Binary files a/src/icons/SmartSite.png and b/src/icons/SmartSite.png differ diff --git a/src/icons/Socket.io.png b/src/icons/Socket.io.png index 88cb992da..f381eecf7 100644 Binary files a/src/icons/Socket.io.png and b/src/icons/Socket.io.png differ diff --git a/src/icons/Solodev.png b/src/icons/Solodev.png index 9588f440d..a36d389e3 100644 Binary files a/src/icons/Solodev.png and b/src/icons/Solodev.png differ diff --git a/src/icons/Stackla Social Hub.png b/src/icons/Stackla Social Hub.png index 189cd66ac..bd7dad114 100644 Binary files a/src/icons/Stackla Social Hub.png and b/src/icons/Stackla Social Hub.png differ diff --git a/src/icons/Stackla.png b/src/icons/Stackla.png index 189cd66ac..bd7dad114 100644 Binary files a/src/icons/Stackla.png and b/src/icons/Stackla.png differ diff --git a/src/icons/Taiga.png b/src/icons/Taiga.png index 5021fab1b..231420fe1 100644 Binary files a/src/icons/Taiga.png and b/src/icons/Taiga.png differ diff --git a/src/icons/TrackJs.png b/src/icons/TrackJs.png index 1f7ae7238..514dad9d9 100644 Binary files a/src/icons/TrackJs.png and b/src/icons/TrackJs.png differ diff --git a/src/icons/TwistPHP.png b/src/icons/TwistPHP.png index 69059691e..6dded2fe4 100644 Binary files a/src/icons/TwistPHP.png and b/src/icons/TwistPHP.png differ diff --git a/src/icons/Unbounce.png b/src/icons/Unbounce.png index dd26fa22a..4b21a7a51 100644 Binary files a/src/icons/Unbounce.png and b/src/icons/Unbounce.png differ diff --git a/src/icons/VTEX Enterprise.png b/src/icons/VTEX Enterprise.png index e222d589c..767831811 100644 Binary files a/src/icons/VTEX Enterprise.png and b/src/icons/VTEX Enterprise.png differ diff --git a/src/icons/Varnish.png b/src/icons/Varnish.png index e547d7467..8addef862 100644 Binary files a/src/icons/Varnish.png and b/src/icons/Varnish.png differ diff --git a/src/icons/WHMCS.png b/src/icons/WHMCS.png index 4f218f8ac..7f8c8a745 100644 Binary files a/src/icons/WHMCS.png and b/src/icons/WHMCS.png differ diff --git a/src/icons/Wikispaces.png b/src/icons/Wikispaces.png index 08034bb24..91034ccf2 100644 Binary files a/src/icons/Wikispaces.png and b/src/icons/Wikispaces.png differ diff --git a/src/icons/XpressEngine.png b/src/icons/XpressEngine.png index 2c92a013b..b780e77b3 100644 Binary files a/src/icons/XpressEngine.png and b/src/icons/XpressEngine.png differ diff --git a/src/icons/git.png b/src/icons/git.png index bf3c05959..5ff1d2b09 100644 Binary files a/src/icons/git.png and b/src/icons/git.png differ diff --git a/src/icons/gitweb.png b/src/icons/gitweb.png index bf3c05959..5ff1d2b09 100644 Binary files a/src/icons/gitweb.png and b/src/icons/gitweb.png differ diff --git a/src/icons/io4 CMS.png b/src/icons/io4 CMS.png index 75b2e30b6..3ed341d32 100644 Binary files a/src/icons/io4 CMS.png and b/src/icons/io4 CMS.png differ diff --git a/src/icons/penguin.png b/src/icons/penguin.png index 44784808d..e87a6a655 100644 Binary files a/src/icons/penguin.png and b/src/icons/penguin.png differ diff --git a/src/icons/uKnowva.png b/src/icons/uKnowva.png index 963ed017f..d668bd6cc 100644 Binary files a/src/icons/uKnowva.png and b/src/icons/uKnowva.png differ