diff --git a/.gitignore b/.gitignore index 36d3e091e..a8d724d9a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ - .vagrant build/* @@ -6,6 +5,11 @@ build/* drivers/npm/node_modules drivers/npm/npm-debug.log +node_modules/ + Thumbs.db +ehthumbs.db +Desktop.ini +$RECYCLE.BIN/ !.gitkeep diff --git a/.travis.yml b/.travis.yml index d716a33ab..62527435c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,13 @@ language: node_js node_js: - - "0.10" -sudo: required + - "0.12" +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: - - sudo apt-get update -y - - sudo apt-get install -y curl zip sudo -y --force-yes - - sudo apt-get clean - - npm install jsonlint jpm -g + - 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 script: wappalyzer build diff --git a/bin/wappalyzer-build b/bin/wappalyzer-build index 0cbc8fe86..5aedbf510 100755 --- a/bin/wappalyzer-build +++ b/bin/wappalyzer-build @@ -15,6 +15,10 @@ echo "Prettifying apps.json..." jsonlint -ist $'\t' $WAPPALYZER_ROOT/src/apps.json +echo "Compressing icons..." + +imagemin $WAPPALYZER_ROOT/src/icons $WAPPALYZER_ROOT/src/icons -o 3 + wappalyzer links # Npm Module diff --git a/bin/wappalyzer-validate-regex b/bin/wappalyzer-validate-regex index 2f72564e1..e55e70648 100755 --- a/bin/wappalyzer-validate-regex +++ b/bin/wappalyzer-validate-regex @@ -27,6 +27,11 @@ for ( app in json.apps ) { attrs = pattern.split('\\;'), regex = '/' + attrs.shift().replace('/', '\/') + '/'; + //Check if the pattern is a valid RegExp + //Note: unlike when used in Wappalyzer, the modifier i isn't added here + new RegExp(regex); + + 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 42c665280..142804515 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -7,13 +7,12 @@ ENV DEBIAN_FRONTEND noninteractive ENV WAPPALYZER_ROOT /home/wappalyzer/synced ENV WAPPALYZER_NODE_PATH /home/wappalyzer/node - # Install packages -RUN apt-get update && apt-get install -y curl nodejs npm zip libfreetype6 libfontconfig +RUN apt-get update && apt-get install -y curl zip libfreetype6 libfontconfig +RUN curl -sL https://deb.nodesource.com/setup_0.12 | bash - +RUN apt-get install -y nodejs RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -RUN ln -s /usr/bin/nodejs /usr/bin/node - # Add user RUN useradd -ms /bin/bash wappalyzer && usermod -a -G docker_env wappalyzer && echo "wappalyzer:wappalyzer" | chpasswd @@ -33,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 -g && su wappalyzer -c "cd $WAPPALYZER_NODE_PATH && npm install" +RUN npm install jsonlint jpm imagemin-cli -g && su wappalyzer -c "cd $WAPPALYZER_NODE_PATH && npm install" # PhantomJS diff --git a/src/apps.json b/src/apps.json index d91a87b97..14c8102b2 100755 --- a/src/apps.json +++ b/src/apps.json @@ -586,7 +586,7 @@ "env": "^Backbone$", "implies": "Underscore.js", "script": "backbone.*\\.js", - "website": "documentcloud.github.com/backbone" + "website": "backbonejs.org" }, "Backdrop": { "cats": [ @@ -1424,6 +1424,14 @@ }, "website": "dle-news.ru" }, + "DataTables": { + "cats": [ + 12 + ], + "implies": "jQuery", + "script": "dataTables.*\\.js", + "website": "datatables.net" + }, "David Webbox": { "cats": [ 22 @@ -1639,7 +1647,7 @@ "meta": { "generator": "Doxygen ([\\d.]+)\\;version:\\1" }, - "website": "stack.nl/~dimitri/doxygen" + "website": "www.stack.nl/~dimitri/doxygen/" }, "DreamWeaver": { "cats": [ @@ -3469,6 +3477,12 @@ ], "website": "lucene.apache.org/core/" }, + "M.R. Inc BoxyOS": { + "cats": [ + 28 + ], + "website": "mrincworld.com" + }, "M.R. Inc Webserver": { "cats": [ 22 @@ -3476,15 +3490,17 @@ "headers": { "Server": "M\\.R\\. Inc Webserver" }, + "implies": [ + "M.R. Inc BoxyOS" + ], "website": "mrincworld.com" }, - "M.R. Inc Wild CMS": { + "M.R. Inc SiteFrame": { "cats": [ - 1, - 6 + 18 ], "headers": { - "X-Powered-By": "M\\.R\\. Inc Wild CMS" + "Powered-By": "M\\.R\\. Inc SiteFrame" }, "website": "mrincworld.com" }, @@ -4365,6 +4381,19 @@ }, "website": "orchardproject.net" }, + "osTicket": { + "cats": [ + 13 + ], + "implies": [ + "PHP", + "MySQL" + ], + "headers": { + "Set-Cookie": "OSTSESSID" + }, + "website": "osticket.com" + }, "Outbrain": { "cats": [ 5 @@ -4784,6 +4813,22 @@ }, "website": "???" }, + "RainLoop": { + "cats": [ + 30 + ], + "env": "^rainloop", + "headers": { + "Server": "RainLoop" + }, + "html": [ + "]*(?:content=\"([^\"]+)[^>]+ id=\"rlAppVersion\"|id=\"rlAppVersion\"[^>]+ content=\"([^\"]+))\\;version:\\1?\\1:\\2", + "]* href=\"[^\"]*rainloop/v/([^/]+)\\;version:\\1" + ], + "implies": "PHP", + "script": "rainloop/v/([^/]+)\\;version:\\1", + "website": "rainloop.net" + }, "RBS Change": { "cats": [ 1, @@ -5602,6 +5647,13 @@ "script": "assetscdn\\.stackla\\.com\\/media\\/js\\/widget\\/(?:[a-zA-Z0-9.]+)?\\.js", "website": "stackla.com/" }, + "Stackla Social Hub": { + "cats": [ + 1 + ], + "env": "^stacklaSocialHub$", + "website": "stackla.com/" + }, "Starlet": { "cats": [ 22 diff --git a/src/drivers/php/Wappalyzer.php b/src/drivers/php/Wappalyzer.php index d05ad19e9..2fcdd93d3 100644 --- a/src/drivers/php/Wappalyzer.php +++ b/src/drivers/php/Wappalyzer.php @@ -133,11 +133,11 @@ class Wappalyzer $headers = trim(substr($response, 0, $headerSize)); $headers = preg_split('/^\s*$/m', $headers); $headers = end($headers); - $lines = array_slice(explode("\r\n", $headers), 1); + $lines = array_slice(explode("\n", $headers), 1); foreach ( $lines as $line ) { if ( strpos(trim($line), ': ') !== false ) { - list($key, $value) = explode(': ', $line); + list($key, $value) = explode(': ', trim($line, "\r")); $result->headers[strtolower($key)] = $value; } diff --git a/src/icons/DataTables.png b/src/icons/DataTables.png new file mode 100644 index 000000000..7b9a86c31 Binary files /dev/null and b/src/icons/DataTables.png differ diff --git a/src/icons/GitLab.png b/src/icons/GitLab.png index d65722d94..570136642 100644 Binary files a/src/icons/GitLab.png and b/src/icons/GitLab.png differ diff --git a/src/icons/M.R. Inc Wild CMS.png b/src/icons/M.R. Inc BoxyOS.png similarity index 100% rename from src/icons/M.R. Inc Wild CMS.png rename to src/icons/M.R. Inc BoxyOS.png diff --git a/src/icons/M.R. Inc SiteFrame.png b/src/icons/M.R. Inc SiteFrame.png new file mode 100644 index 000000000..1e3e20e1b Binary files /dev/null and b/src/icons/M.R. Inc SiteFrame.png differ diff --git a/src/icons/RainLoop.png b/src/icons/RainLoop.png new file mode 100644 index 000000000..a8ebb1002 Binary files /dev/null and b/src/icons/RainLoop.png differ diff --git a/src/icons/Stackla Social Hub.png b/src/icons/Stackla Social Hub.png new file mode 100644 index 000000000..189cd66ac Binary files /dev/null and b/src/icons/Stackla Social Hub.png differ diff --git a/src/icons/osTicket.png b/src/icons/osTicket.png new file mode 100755 index 000000000..a6f9a1e2c Binary files /dev/null and b/src/icons/osTicket.png differ