diff --git a/.travis.yml b/.travis.yml index 7009b2ce8..2b27a8fa7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,3 +23,6 @@ deploy: env: - CXX=g++-4.8 + +notifications: + slack: wappalyzer:ppXlJRMBDxrKYS9vgVxT7FuH diff --git a/README.md b/README.md index ed13de90d..79b36246e 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,18 @@ # Wappalyzer [![Travis](https://img.shields.io/travis/AliasIO/Wappalyzer.svg)](https://travis-ci.org/AliasIO/Wappalyzer/) [![Scrutinizer](https://scrutinizer-ci.com/g/AliasIO/Wappalyzer/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/AliasIO/Wappalyzer/?branch=master) -[Wappalyzer](https://wappalyzer.com/) is a +[Wappalyzer](https://www.wappalyzer.com/) is a [cross-platform](https://github.com/AliasIO/Wappalyzer/wiki/Drivers) utility that uncovers the technologies used on websites. It detects -[content management systems](https://wappalyzer.com/categories/cms), -[eCommerce platforms](https://wappalyzer.com/categories/ecommerce), -[web servers](https://wappalyzer.com/categories/web-servers), -[JavaScript frameworks](https://wappalyzer.com/categories/javascript-frameworks), -[analytics tools](https://wappalyzer.com/categories/analytics) and -[many more](https://wappalyzer.com/applications). +[content management systems](https://www.wappalyzer.com/categories/cms), +[eCommerce platforms](https://www.wappalyzer.com/categories/ecommerce), +[web servers](https://www.wappalyzer.com/categories/web-servers), +[JavaScript frameworks](https://www.wappalyzer.com/categories/javascript-frameworks), +[analytics tools](https://www.wappalyzer.com/categories/analytics) and +[many more](https://www.wappalyzer.com/applications). *Licensed under the [GPL](https://github.com/AliasIO/Wappalyzer/blob/master/LICENSE).* ## Documentation -Please read the [developer documentation](https://wappalyzer.com/docs) to get started. +Please read the [developer documentation](https://www.wappalyzer.com/docs) to get started. diff --git a/bin/build b/bin/build index 9f38e3454..ea7ad0cc8 100755 --- a/bin/build +++ b/bin/build @@ -49,50 +49,65 @@ pushd $webextension_dir > /dev/null sed -i "s/\"version\": \"[^\"]*\"/\"version\": \"$version\"/" manifest.json -zip -qr ../../../build/wappalyzer_webextension.zip . +zip -qr ../../../build/wappalyzer_webextension.zip . \ + -x images/icon_44.png \ + -x images/icon_50.png \ + -x images/icon_150.png \ + -x js/ms_\*.js \ + -x manifest.edge.json \ + -x \*.log \ + -x \*.lock \ + -x \*.gitignore \ + -x \*.gitkeep \ + -x \*.js.map \ + -x \*.min.js \ + -x \*.yarn-integrity \ + -x \*package.json \ + -x \*LICENSE \ + -x \*README.md popd > /dev/null # Edge -echo "Building Edge application..." - -pushd build > /dev/null - -webextension_dir="../$webextension_dir" -manifest_dir="Wappalyzer/edgeextension/manifest" - -mv $webextension_dir/manifest.json $webextension_dir/manifest.webextension.json -mv $webextension_dir/manifest.edge.json $webextension_dir/manifest.json - -sed -i "s/\"version\": \"[^\"]*\"/\"version\": \"$version\"/" $webextension_dir/manifest.json - -manifoldjs -l debug -p edgeextension -f edgeextension -m $webextension_dir/manifest.json - -# Replace symlinks with actual files -rm $manifest_dir/Extension/images/icons - -cp ../src/apps.json $manifest_dir/Extension -cp ../src/wappalyzer.js $manifest_dir/Extension/js -cp -r ../src/icons $manifest_dir/Extension/images - -mv $webextension_dir/manifest.json $webextension_dir/manifest.edge.json -mv $webextension_dir/manifest.webextension.json $webextension_dir/manifest.json - -sed -i 's/INSERT-YOUR-PACKAGE-IDENTITY-NAME-HERE/1591Wappalyzer.Wappalyzer/' $manifest_dir/appxmanifest.xml -sed -i 's/INSERT-YOUR-PACKAGE-IDENTITY-PUBLISHER-HERE/D240C22F-A6C1-45DF-BF7B-4C835064DF51/' $manifest_dir/appxmanifest.xml -sed -i 's/INSERT-YOUR-PACKAGE-PROPERTIES-PUBLISHERDISPLAYNAME-HERE/Wappalyzer/' $manifest_dir/appxmanifest.xml -sed -i 's/Version="0.\([^"]\+\)/Version="\1.0/' $manifest_dir/appxmanifest.xml - -cp $webextension_dir/images/icon_44.png $manifest_dir/Assets/Square44x44Logo.png -cp $webextension_dir/images/icon_150.png $manifest_dir/Assets/Square150x150Logo.png -cp $webextension_dir/images/icon_50.png $manifest_dir/Assets/StoreLogo.png - -manifoldjs -l debug -p edgeextension package $manifest_dir - -mv Wappalyzer/edgeextension/package/edgeExtension.appx wappalyzer_edge.appx - -rm -rf Wappalyzer - -popd > /dev/null +#echo "Building Edge application..." +# +#pushd build > /dev/null +# +#webextension_dir="../$webextension_dir" +#manifest_dir="Wappalyzer/edgeextension/manifest" +# +#mv $webextension_dir/manifest.json $webextension_dir/manifest.webextension.json +#mv $webextension_dir/manifest.edge.json $webextension_dir/manifest.json +# +#sed -i "s/\"version\": \"[^\"]*\"/\"version\": \"$version\"/" $webextension_dir/manifest.json +# +#manifoldjs -l debug -p edgeextension -f edgeextension -m $webextension_dir/manifest.json +# +## Replace symlinks with actual files +#rm $manifest_dir/Extension/images/icons +# +#cp ../src/apps.json $manifest_dir/Extension +#cp ../src/wappalyzer.js $manifest_dir/Extension/js +#cp -r ../src/icons $manifest_dir/Extension/images +# +#mv $webextension_dir/manifest.json $webextension_dir/manifest.edge.json +#mv $webextension_dir/manifest.webextension.json $webextension_dir/manifest.json +# +#sed -i 's/INSERT-YOUR-PACKAGE-IDENTITY-NAME-HERE/1591Wappalyzer.Wappalyzer/' $manifest_dir/appxmanifest.xml +#sed -i 's/INSERT-YOUR-PACKAGE-IDENTITY-PUBLISHER-HERE/D240C22F-A6C1-45DF-BF7B-4C835064DF51/' $manifest_dir/appxmanifest.xml +#sed -i 's/INSERT-YOUR-PACKAGE-PROPERTIES-PUBLISHERDISPLAYNAME-HERE/Wappalyzer/' $manifest_dir/appxmanifest.xml +#sed -i 's/Version="0.\([^"]\+\)/Version="\1.0/' $manifest_dir/appxmanifest.xml +# +#cp $webextension_dir/images/icon_44.png $manifest_dir/Assets/Square44x44Logo.png +#cp $webextension_dir/images/icon_150.png $manifest_dir/Assets/Square150x150Logo.png +#cp $webextension_dir/images/icon_50.png $manifest_dir/Assets/StoreLogo.png +# +#manifoldjs -l debug -p edgeextension package $manifest_dir +# +#mv Wappalyzer/edgeextension/package/edgeExtension.appx wappalyzer_edge.appx +# +#rm -rf Wappalyzer +# +#popd > /dev/null echo "Done (v$version)." diff --git a/bin/validate-icons b/bin/validate-icons index 467f6df19..8a6913a46 100755 --- a/bin/validate-icons +++ b/bin/validate-icons @@ -4,18 +4,24 @@ var app, fs = require('fs'), fileType = require('../node_modules/file-type'), - readChunk = require('../node_modules/read-chunk') - isSvg = require('../node_modules/is-svg') - json = require('../src/apps.json'); + readChunk = require('../node_modules/read-chunk'), + isSvg = require('../node_modules/is-svg'), + json = require('../src/apps.json'), + + basePath = 'src/icons/', + + iconPaths = [];//Will be used to check for stray icons + for (app in json.apps) { (function(app) { var - basePath = 'src/icons/'; iconPath = json.apps[app].icon || 'default.svg'; path = basePath + iconPath, ext = iconPath.substr(iconPath.length - 4); + iconPaths.push(iconPath) + if ( ext !== '.png' && ext !== '.svg' ) { throw err = new Error('Icon file extension specified for app "' + app + '" is not ".png" or ".svg": src/icons/' + iconPath); } @@ -41,3 +47,14 @@ for (app in json.apps) { }); }(app)); } + + +// Check for stray files in icons folder + fs.readdirSync(basePath).forEach(function(file) { + if (!fs.statSync(basePath + file).isDirectory()) { + if(iconPaths.indexOf(file) === -1){ + throw new Error('Stray file (no associated app): ' + basePath + file); + } + } + }); + diff --git a/bin/validate-regex b/bin/validate-regex index 423aa2c69..380ffdb15 100755 --- a/bin/validate-regex +++ b/bin/validate-regex @@ -75,6 +75,18 @@ for ( app in json.apps ) { throw new Error('HTML patterns must contain "<" or ">".\n' + app + ': ' + type + ': ' + pattern); } } + + //Warn about suspicious periods (".") in patterns which should probably have been escaped + // Periods inside character classes (such as [\d.]) don't count as wildcard, so we'll replace + // the character classes in the pattern with "_". (We could remove them entirely, but then + // we'd have to deal with leftover * and + characters; for example, removing the character + // class entirely from the pattern /test.[a-z]+/ would yield the pattern /test.+/, which + // would mean not detecting the un-escaped ".". Replacing the character class with an + // underscore instead gives /test._+/, which WOULD yield a warning about the unescaped ".".) + if ( /(?:^\/|[^\\])\.(?:[^*+]|\/$)/.test(regex.replace(/([^\\]|^)\[[^\]]+\]/g,'$1_') ) ) { + console.warn('Suspicious period (".") in pattern. Should this have been escaped?\n\tApp: ' + app + '\n\tPattern: ' + type + ': ' + pattern); + } + }); } }); diff --git a/src/apps.json b/src/apps.json index 9ab09dcfb..349376559 100644 --- a/src/apps.json +++ b/src/apps.json @@ -14,8 +14,8 @@ "1" ], "headers": { - "Set-Cookie": "BITRIX_", - "X-Powered-CMS": "Bitrix Site Manager" + "Set-Cookie": "^BITRIX_", + "X-Powered-CMS": "^Bitrix Site Manager" }, "html": "(?:]+components/bitrix|(?:src|href)=\"/bitrix/(?:js|templates))", "icon": "1C-Bitrix.png", @@ -78,6 +78,17 @@ "icon": "ebis.png", "website": "http://www.ebis.ne.jp" }, + "Amber": { + "cats": [ + "18", + "22" + ], + "headers": { + "X-Powered-By": "^Amber$" + }, + "icon": "amber.png", + "website": "https://amberframework.org" + }, "AMPcms": { "cats": [ "1" @@ -256,7 +267,7 @@ "36" ], "headers": { - "X-Advertising-By": "adnegah.net" + "X-Advertising-By": "adnegah\\.net" }, "html": "