diff --git a/.travis.yml b/.travis.yml index c6d5ebf3a..7009b2ce8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,8 +7,8 @@ after_success: - sha256sum build/* > build/SHA256SUMS - cat build/SHA256SUMS -script: - - ./run build +script: |- + version=$(grep '"version":' src/drivers/webextension/manifest.json | sed 's/^.*"version": "\(.*\)".*$/\1/'); ./run build $version deploy: provider: releases diff --git a/Dockerfile b/Dockerfile index 79d7c0f38..f2a28e638 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,10 +13,9 @@ RUN apk update && apk add --no-cache \ optipng \ zip -RUN mkdir -p /usr/share && \ - cd /usr/share \ - && curl -L https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 | tar xj \ - && ln -s /usr/share/phantomjs/phantomjs /usr/bin/phantomjs +# Fixes PhantomJS +# https://github.com/dustinblackman/phantomized +RUN curl -Ls "https://github.com/dustinblackman/phantomized/releases/download/2.1.1a/dockerized-phantomjs.tar.gz" | tar xz -C / RUN apk del \ curl diff --git a/bin/build b/bin/build index 2c2941ba6..9f38e3454 100755 --- a/bin/build +++ b/bin/build @@ -2,17 +2,31 @@ cd "$(dirname $0)/.." +version="$2" + +if [[ -z "$version" ]]; then + current=$(grep '"version":' src/drivers/webextension/manifest.json | sed 's/^.*"version": "\(.*\)".*$/\1/') + + echo "No version specified. Current version is $current." + + exit 1; +fi + set -eu ./bin/validate +echo "Deleting junk files..." + +find . -name ".DS_Store" -exec rm {} \; + echo "Prettifying apps.json..." jsonlint-cli -ist $'\t' src/apps.json echo "Converting SVG icons to PNG..." -#svg2png-many -i src/icons/ -o src/icons/converted/ --width=32 --height=32 +svg2png-many -i src/icons/ -o src/icons/converted/ --width=32 --height=32 echo "Compressing PNG icons..." @@ -23,6 +37,9 @@ optipng -quiet "src/icons/converted/*.png" set -e +# NPM +sed -i "s/\"version\": \"[^\"]*\"/\"version\": \"$version\"/" src/drivers/npm/package.json + # WebExtension echo "Building WebExtension..." @@ -30,6 +47,8 @@ webextension_dir=src/drivers/webextension pushd $webextension_dir > /dev/null +sed -i "s/\"version\": \"[^\"]*\"/\"version\": \"$version\"/" manifest.json + zip -qr ../../../build/wappalyzer_webextension.zip . popd > /dev/null @@ -45,6 +64,8 @@ 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 @@ -74,4 +95,4 @@ rm -rf Wappalyzer popd > /dev/null -echo "Done." +echo "Done (v$version)." diff --git a/package.json b/package.json index dd2dbe93d..2148f0f67 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,7 @@ "dependencies": { "file-type": "3.8.*", "is-svg": "2.0.*", - "read-chunk": "2.0.*", - "svg2png-many": "*" + "read-chunk": "2.0.*" } } diff --git a/src/apps.json b/src/apps.json index 24326e933..b056c42d9 100755 --- a/src/apps.json +++ b/src/apps.json @@ -2571,7 +2571,7 @@ ], "icon": "FancyBox.png", "implies": "jQuery", - "script": "jquery\\.fancybox\\.pack\\.js(?:\\?v=([\\d.]+))?$\\;version:\\1", + "script": "jquery\\.fancybox(\\.pack|\\.min)?\\.js(\\?v=([\\d.]+))?$\\;version:\\3", "website": "http://fancyapps.com/fancybox" }, "Fastly": { @@ -3100,7 +3100,7 @@ "19" ], "env": "^prettyPrint$", - "icon": "Google Code Prettify.png", + "icon": "Google.svg", "website": "http://code.google.com/p/google-code-prettify" }, "Google Font API": { @@ -3193,7 +3193,7 @@ "headers": { "Server": "gws" }, - "icon": "Google Web Server.png", + "icon": "Google.svg", "website": "http://en.wikipedia.org/wiki/Google_Web_Server" }, "Google Web Toolkit": { @@ -3652,6 +3652,16 @@ "url": "/wps/", "website": "http://ibm.com/software/websphere/portal" }, + "Ideasoft": { + "cats": [ + "6" + ], + "icon": "Ideasoft.png", + "script": [ + "\\.myideasoft\\.com/" + ], + "website": "https://www.ideasoft.com" + }, "IIS": { "cats": [ "22" @@ -3925,6 +3935,16 @@ "icon": "JC-HTTPD.png", "implies": "Canon", "website": "http://canon.com" + }, + "JET Enterprise": { + "cats": [ + "6" + ], + "headers": { + "powered": "jet-enterprise" + }, + "icon": "JET Enterprise.svg", + "website": "http://www.jetecommerce.com.br/" }, "JS Charts": { "cats": [ @@ -4280,6 +4300,18 @@ }, "website": "http://koala-framework.org" }, + "KobiMaster": { + "cats": [ + "6" + ], + "icon": "Kobimaster.png", + "implies": "Microsoft ASP.NET", + "env": [ + "^kmPageInfo$", + "^kmGetSession$" + ], + "website": "http://www.kobimaster.com.tr/" + }, "Koego": { "cats": [ "10" @@ -4885,6 +4917,15 @@ "script": "munchkin\\.marketo\\.net/munchkin\\.js", "website": "http://www.marketo.com" }, + "Material Design Lite": { + "cats": [ + "18" + ], + "html": "]* href=\"[^\"]*material(?:\\.[\\w]+-[\\w]+)?(?:\\.min)?\\.css", + "icon": "Material Design Lite.png", + "script": "material(?:\\.min)?\\.js", + "website": "https://getmdl.io" + }, "Materialize CSS": { "cats": [ "18" @@ -5238,7 +5279,7 @@ "cats": [ "12" ], - "icon": "Moment.js.png", + "icon": "Moment.js.svg", "implies": "Moment.js", "script": "moment-timezone(?:\\-data)?(?:\\.min)?\\.js", "website": "http://momentjs.com/timezone/" @@ -5248,7 +5289,7 @@ "12" ], "env": "^moment$", - "icon": "Moment.js.png", + "icon": "Moment.js.svg", "script": "moment(?:\\.min)?\\.js", "website": "http://momentjs.com" }, @@ -5492,6 +5533,16 @@ "env": "^sitestat$", "icon": "Nedstat.png", "website": "http://www.nedstat.com" + }, + "NEO - Omnichannel Commerce Platform": { + "cats": [ + "6" + ], + "headers": { + "powered": "jet-neo" + }, + "icon": "Plataforma NEO.svg", + "website": "http://www.jetecommerce.com.br/" }, "Neos CMS": { "cats": [ @@ -5826,7 +5877,7 @@ "headers": { "Server": "GSE" }, - "icon": "OpenGSE.png", + "icon": "Google.svg", "implies": "Java", "website": "http://code.google.com/p/opengse" }, @@ -7503,6 +7554,16 @@ }, "website": "http://www.silverstripe.org" }, + "Simplébo": { + "cats": [ + "1" + ], + "headers": { + "X-ServedBy": "simplebo" + }, + "icon": "Simplebo.png", + "website": "https://www.simplebo.fr" + }, "SimpleHTTP": { "cats": [ "22" @@ -8184,6 +8245,16 @@ "icon": "Tengine.png", "website": "http://tengine.taobao.org" }, + "Textalk": { + "cats": [ + "6" + ], + "meta": { + "generator": "Textalk Webshop" + }, + "icon": "textalk.png", + "website": "https://www.textalk.se" + }, "Textpattern CMS": { "cats": [ "1" @@ -8222,6 +8293,26 @@ "implies": "PHP", "website": "http://www.thinkphp.cn" }, + "Ticimax": { + "cats": [ + "6" + ], + "icon": "Ticimax.png", + "script": [ + "cdn\\.ticimax\\.com/" + ], + "website": "https://www.ticimax.com" + }, + "Tictail": { + "cats": [ + "6" + ], + "script": [ + "https:\\/\\/tictail\\.com" + ], + "icon": "tictail.png", + "website": "https://tictail.com" + }, "TiddlyWiki": { "cats": [ "1", @@ -8348,6 +8439,16 @@ "script": "lucide\\.init(?:\\.min)?\\.js", "website": "http://www.translucide.net" }, + "T-Soft": { + "cats": [ + "6" + ], + "icon": "Tsoft.png", + "meta": { + "copyright": "T-Soft E-Ticaret Sistemleri" + }, + "website": "http://www.tsoft.com.tr/" + }, "Tumblr": { "cats": [ "11" @@ -9022,6 +9123,16 @@ "url": "/websale7/", "website": "http://websale.de" }, + "WebSite X5": { + "cats": [ + "20" + ], + "meta": { + "generator": "Incomedia WebSite X5 (\\w+ [\\d.]+)\\;version:\\1" + }, + "icon": "WebSite X5.png", + "website": "http://websitex5.com" + }, "WebsiteBaker": { "cats": [ "1" @@ -9061,6 +9172,16 @@ "script": "cdn\\d+\\.editmysite\\.com", "website": "http://www.weebly.com" }, + "Wikinggruppen": { + "cats": [ + "6" + ], + "html": [ + " + + + + + + + + + + + + + + + + + + + + diff --git a/src/icons/textalk.png b/src/icons/textalk.png new file mode 100644 index 000000000..f2cd02094 Binary files /dev/null and b/src/icons/textalk.png differ diff --git a/src/icons/tictail.png b/src/icons/tictail.png new file mode 100644 index 000000000..9ca29b6d8 Binary files /dev/null and b/src/icons/tictail.png differ diff --git a/src/icons/wikinggruppen.png b/src/icons/wikinggruppen.png new file mode 100644 index 000000000..b9f7c5e39 Binary files /dev/null and b/src/icons/wikinggruppen.png differ diff --git a/src/icons/wpCache.png b/src/icons/wpCache.png index e8a21e343..7f24b9d35 100644 Binary files a/src/icons/wpCache.png and b/src/icons/wpCache.png differ diff --git a/src/wappalyzer.js b/src/wappalyzer.js index 093f1b0bb..6fed51ec9 100644 --- a/src/wappalyzer.js +++ b/src/wappalyzer.js @@ -116,11 +116,7 @@ class Wappalyzer { this.driver.getRobotsTxt(parsed.host, parsed.protocol === 'https:') .then(robotsTxt => { - robotsTxt.forEach(disallow => { - if ( parsed.pathname.indexOf(disallow) === 0 ) { - reject(); - } - }); + robotsTxt.forEach(disallow => parsed.pathname.indexOf(disallow) === 0 && reject()); resolve(); }); @@ -270,7 +266,7 @@ class Wappalyzer { Object.keys(apps).forEach(appName => { var app = apps[appName]; - if ( app && app.implies ) { + if ( app && app.props.implies ) { this.asArray(app.props.implies).forEach(implied => { implied = this.parsePatterns(implied)[0]; @@ -281,7 +277,7 @@ class Wappalyzer { } if ( !( implied.string in apps ) ) { - apps[implied.string] = this.detected[url] && this.detected[url][implied.string] ? this.detected[url][implied.string] : new Application(implied.string, true); + apps[implied.string] = this.detected[url] && this.detected[url][implied.string] ? this.detected[url][implied.string] : new Application(implied.string, this.apps[implied.string], true); checkImplies = true; } @@ -300,10 +296,6 @@ class Wappalyzer { * Cache detected applications */ cacheDetectedApps(apps, url) { - if ( !( this.driver.ping instanceof Function ) ) { - return; - } - Object.keys(apps).forEach(appName => { var app = apps[appName]; @@ -315,7 +307,9 @@ class Wappalyzer { }); }) - this.ping(); + if ( this.driver.ping instanceof Function ) { + this.ping(); + } } /** @@ -352,7 +346,7 @@ class Wappalyzer { this.hostnameCache[hostname].applications[appName].version = app.version; } }) - .catch(() => console.log('Disallowed in robots.txt: ' + url)) + .catch(() => this.log('Disallowed in robots.txt: ' + url), 'core') } } });