diff --git a/.travis.yml b/.travis.yml
index cf4351c55..3fda78932 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,14 +1,21 @@
language: node_js
node_js:
- - "4.2.2"
+ - "4"
sudo: false
before_install:
- - export WAPPALYZER_ROOT=$TRAVIS_BUILD_DIR
- - export WAPPALYZER_NODE_PATH=$TRAVIS_BUILD_DIR
- - export PATH=$PATH:$TRAVIS_BUILD_DIR/bin
-install:
- - npm install jsonlint jpm imagemin-cli svgo -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
-script: wappalyzer build
+ - export WAPPALYZER_ROOT=$TRAVIS_BUILD_DIR
+ - export WAPPALYZER_NODE_PATH=$TRAVIS_BUILD_DIR
+ - export PATH=$PATH:$TRAVIS_BUILD_DIR/bin
+ - ln -s docker/node/package.json package.json
after_script: ls -l --block-size=kB build
+cache:
+ directories:
+ - node_modules
+env:
+ - CXX=g++-4.8
+addons:
+ apt:
+ sources:
+ - ubuntu-toolchain-r-test
+ packages:
+ - g++-4.8
diff --git a/bin/wappalyzer-build b/bin/wappalyzer-build
index f55ab112e..0d48405a1 100755
--- a/bin/wappalyzer-build
+++ b/bin/wappalyzer-build
@@ -7,21 +7,28 @@ then
exit 1
fi
+if [ -z $WAPPALYZER_NODE_PATH ]
+then
+ echo "\$WAPPALYZER_NODE_PATH not set"
+
+ exit 1
+fi
+
set -eu
wappalyzer validate
echo "Prettifying apps.json..."
-jsonlint -ist $'\t' $WAPPALYZER_ROOT/src/apps.json
+node $WAPPALYZER_NODE_PATH/node_modules/jsonlint/lib/cli.js -ist $'\t' $WAPPALYZER_ROOT/src/apps.json
echo "Compressing PNG icons..."
-imagemin $WAPPALYZER_ROOT/src/icons $WAPPALYZER_ROOT/src/icons -o 3
+node $WAPPALYZER_NODE_PATH/node_modules/imagemin-cli/cli.js $WAPPALYZER_ROOT/src/icons $WAPPALYZER_ROOT/src/icons -o 7
echo "Compressing SVG icons..."
-svgo -f $WAPPALYZER_ROOT/src/icons $WAPPALYZER_ROOT/src/icons
+node $WAPPALYZER_NODE_PATH/node_modules/svgo/bin/svgo -q -f $WAPPALYZER_ROOT/src/icons $WAPPALYZER_ROOT/src/icons
wappalyzer links
@@ -34,7 +41,7 @@ echo "Building Firefox driver..."
pushd $WAPPALYZER_ROOT/src/drivers/firefox > /dev/null
-jpm xpi && mv *.xpi $WAPPALYZER_ROOT/build/wappalyzer_firefox.xpi
+node $WAPPALYZER_NODE_PATH/node_modules/jpm/bin/jpm xpi && mv *.xpi $WAPPALYZER_ROOT/build/wappalyzer_firefox.xpi
popd > /dev/null
diff --git a/bin/wappalyzer-links b/bin/wappalyzer-links
index 9501a383d..2afbfada0 100755
--- a/bin/wappalyzer-links
+++ b/bin/wappalyzer-links
@@ -30,19 +30,23 @@ echo "Creating hard links..."
ln -f $path/wappalyzer.js $path/drivers/firefox/lib
ln -f $path/apps.json $path/drivers/firefox/data
ln -f $path/icons/*.png $path/drivers/firefox/data/images/icons
+ln -f $path/icons/*.svg $path/drivers/firefox/data/images/icons
ln -f $path/utils/*.js $path/drivers/firefox/data/js
ln -f $path/wappalyzer.js $path/drivers/chrome/js
ln -f $path/apps.json $path/drivers/chrome
ln -f $path/icons/*.png $path/drivers/chrome/images/icons
+ln -f $path/icons/*.svg $path/drivers/chrome/images/icons
ln -f $path/utils/*.js $path/drivers/chrome/js
ln -f $path/wappalyzer.js $path/drivers/bookmarklet/js
ln -f $path/icons/*.png $path/drivers/bookmarklet/images/icons
+ln -f $path/icons/*.svg $path/drivers/bookmarklet/images/icons
ln -f $path/wappalyzer.js $path/drivers/html/js
ln -f $path/apps.json $path/drivers/html
ln -f $path/icons/*.png $path/drivers/html/images/icons
+ln -f $path/icons/*.svg $path/drivers/html/images/icons
ln -f $path/wappalyzer.js $path/drivers/php/js
ln -f $path/apps.json $path/drivers/php
diff --git a/bin/wappalyzer-validate b/bin/wappalyzer-validate
index a6e8c691e..d9d09a617 100755
--- a/bin/wappalyzer-validate
+++ b/bin/wappalyzer-validate
@@ -27,7 +27,7 @@ path="$path/src"
echo "Validating apps.json..."
-jsonlint --quiet -V $WAPPALYZER_ROOT/schema.json $path/apps.json
+node $WAPPALYZER_NODE_PATH/node_modules/jsonlint/lib/cli.js --quiet -V $WAPPALYZER_ROOT/schema.json $path/apps.json
echo "Validating regular expressions..."
diff --git a/bin/wappalyzer-validate-icons b/bin/wappalyzer-validate-icons
index 38a8cb2bf..3ec796ac6 100755
--- a/bin/wappalyzer-validate-icons
+++ b/bin/wappalyzer-validate-icons
@@ -31,7 +31,11 @@ for (app in json.apps) {
if (exists) {
if (type === "PNG") {
var buffer = fileType(readChunk.sync(path, 0, 262));
- if (buffer.mime !== 'image/png') {
+ if (buffer === null) {
+ var err = new Error('Unknown mimetype or bad file for "' + app + '": src/icons/' + iconPath);
+ throw err;
+ }
+ else if (buffer.mime !== 'image/png') {
var err = new Error('Incorrect mimetype "' + buffer.mime + '" when expected PNG for app "' + app + '": src/icons/' + iconPath);
throw err;
}
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 857cf65a6..625b6bf14 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -32,7 +32,7 @@ RUN su wappalyzer -c "mkdir $WAPPALYZER_NODE_PATH"
ADD node/package.json $WAPPALYZER_NODE_PATH/package.json
-RUN npm install jsonlint jpm imagemin-cli svgo -g && su wappalyzer -c "cd $WAPPALYZER_NODE_PATH && npm install"
+RUN su wappalyzer -c "cd $WAPPALYZER_NODE_PATH && npm i"
# PhantomJS
diff --git a/docker/node/package.json b/docker/node/package.json
index e3174ad53..b75954434 100644
--- a/docker/node/package.json
+++ b/docker/node/package.json
@@ -1,7 +1,26 @@
{
+ "name": "wappalyzer-test",
+ "private": true,
+ "license": "GPLv3",
+ "bugs": {
+ "url": "https://github.com/AliasIO/Wappalyzer/issues"
+ },
+ "homepage": "https://github.com/AliasIO/Wappalyzer",
+ "description": "Build test for Wappalyzer",
+ "repository": "AliasIO/Wappalyzer",
+ "scripts": {
+ "test": "./bin/wappalyzer build"
+ },
"devDependencies": {
- "file-type": "3.1.*",
+ "file-type": "3.4.*",
"is-svg": "1.1.*",
- "read-chunk": "1.0.*"
+ "read-chunk": "1.0.*",
+ "jsonlint": "*",
+ "jpm": "*",
+ "imagemin-cli": "*",
+ "svgo": "*"
+ },
+ "engines": {
+ "node": ">= 4"
}
}
diff --git a/src/apps.json b/src/apps.json
index edfd520aa..a6b8491ab 100755
--- a/src/apps.json
+++ b/src/apps.json
@@ -1,8771 +1,8853 @@
{
- "apps": {
- "1C-Bitrix": {
- "cats": [
- 1
- ],
- "headers": {
- "Set-Cookie": "BITRIX_",
- "X-Powered-CMS": "Bitrix Site Manager"
- },
- "html": "(?:]+components/bitrix|(?:src|href)=\"/bitrix/(?:js|templates))",
- "implies": "PHP",
- "script": "1c-bitrix",
- "website": "www.1c-bitrix.ru",
- "icon": "1C-Bitrix.png"
- },
- "1und1": {
- "cats": [
- 6
- ],
- "implies": "PHP",
- "url": "/shop/catalog/browse\\?sessid=",
- "website": "1und1.de",
- "icon": "1und1.png"
- },
- "2z Project": {
- "cats": [
- 1
- ],
- "meta": {
- "generator": "2z project ([\\d.]+)\\;version:\\1"
- },
- "website": "2zproject-cms.ru",
- "icon": "2z Project.png"
- },
- "3DM": {
- "cats": [
- 19
- ],
- "html": "
3ware 3DM([\\d\\.]+)?\\;version:\\1",
- "implies": "3ware",
- "website": "www.3ware.com",
- "icon": "3DM.png"
- },
- "3dCart": {
- "cats": [
- 1,
- 6
- ],
- "headers": {
- "Set-Cookie": "3dvisit",
- "X-Powered-By": "3DCART"
- },
- "script": "(?:twlh(?:track)?\\.asp|3d_upsell\\.js)",
- "website": "www.3dcart.com",
- "icon": "3dCart.png"
- },
- "3ware": {
- "cats": [
- 22
- ],
- "headers": {
- "Server": "3ware\\/?([\\d\\.]+)?\\;version:\\1"
- },
- "website": "www.3ware.com",
- "icon": "3ware.png"
- },
- "AMPcms": {
- "cats": [
- 1
- ],
- "env": "^amp_js_init$",
- "headers": {
- "Set-Cookie": "^AMP=",
- "X-AMP-Version": "([\\d.]+)\\;version:\\1"
- },
- "implies": "PHP",
- "website": "www.ampcms.org",
- "icon": "AMPcms.png"
- },
- "AOLserver": {
- "cats": [
- 22
- ],
- "headers": {
- "Server": "AOLserver/?([\\d.]+)?\\;version:\\1"
- },
- "website": "aolserver.com",
- "icon": "AOLserver.png"
- },
- "AT Internet Analyzer": {
- "cats": [
- 10
- ],
- "env": "^xtsite$",
- "website": "atinternet.com/en",
- "icon": "AT Internet Analyzer.png"
- },
- "AT Internet XiTi": {
- "cats": [
- 10
- ],
- "env": "^Xt_",
- "script": "xiti\\.com/hit\\.xiti",
- "website": "atinternet.com/en",
- "icon": "AT Internet XiTi.png"
- },
- "ATEN": {
- "cats": [
- 22
- ],
- "headers": {
- "Server": "ATEN HTTP Server(?:\\(?V?([\\d\\.]+)\\)?)?\\;version:\\1"
- },
- "website": "www.aten.com",
- "icon": "ATEN.png"
- },
- "Oracle Commerce": {
- "cats": [
- 6
- ],
- "headers": {
- "X-ATG-Version": "(?:ATGPlatform/([\\d.]+))?\\;version:\\1"
- },
- "html": "<[^>]+_dyncharset",
- "website": "www.oracle.com/applications/customer-experience/commerce/products/commerce-platform/index.html",
- "icon": "Oracle Commerce.png"
- },
- "Oracle Commerce Cloud": {
- "cats": [
- 6
- ],
- "headers": {
- "OracleCommerceCloud-Version": "(.*)\\;version:\\1"
- },
- "html": "<[^>]+id=\"oracle-cc\"",
- "website": "cloud.oracle.com/commerce-cloud",
- "icon": "Oracle Commerce Cloud.png"
- },
- "AWStats": {
- "cats": [
- 10
- ],
- "implies": "Perl",
- "meta": {
- "generator": "AWStats ([\\d.]+(?: \\(build [\\d.]+\\))?)\\;version:\\1"
- },
- "website": "awstats.sourceforge.net",
- "icon": "AWStats.png"
- },
- "Accessible Portal": {
- "cats": [
- 1
- ],
- "implies": "PHP",
- "meta": {
- "generator": "Accessible Portal"
- },
- "website": "www.accessibleportal.com",
- "icon": "Accessible Portal.png"
- },
- "AdInfinity": {
- "cats": [
- 36
- ],
- "script": "adinfinity\\.com\\.au",
- "website": "adinfinity.com.au",
- "icon": "AdInfinity.png"
- },
- "AdRiver": {
- "cats": [
- 36
- ],
- "env": "^adriver$",
- "html": "(?: