Convert SVG icons to PNG for Chrome. Convert slugs to English names for categories in apps.json. Upgrade to Ubuntu Xenial (wappalyzer/dev)

main
Elbert Alias 8 years ago
parent 0bff623f17
commit f82083b340

2
.gitignore vendored

@ -5,6 +5,8 @@ build/*
drivers/npm/node_modules drivers/npm/node_modules
drivers/npm/npm-debug.log drivers/npm/npm-debug.log
src/icons/converted/*
package.json package.json
node_modules/ node_modules/
npm-debug.log npm-debug.log

@ -30,6 +30,24 @@ echo "Compressing SVG icons..."
node $WAPPALYZER_NODE_PATH/node_modules/svgo/bin/svgo -q -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
echo "Converting SVG icons to PNG..."
OIFS="$IFS"
IFS=$'\n'
for svg in $(find $WAPPALYZER_ROOT/src/icons -type f -name "*.svg")
do
echo " Converting $(basename "$svg")..."
dest="$WAPPALYZER_ROOT/src/icons/converted/$(basename "$svg").png"
if [[ ! -f "$dest" ]]; then
svg2png "$svg" --width=32 --height=32 --output "$dest" || true
fi
done
IFS="$OIFS"
wappalyzer links wappalyzer links
# Npm Module # Npm Module

@ -27,41 +27,41 @@ path="$path/src"
echo "Creating hard links..." echo "Creating hard links..."
ln -f $path/wappalyzer.js $path/drivers/firefox/lib ln -f $path/wappalyzer.js $path/drivers/firefox/lib
ln -f $path/apps.json $path/drivers/firefox/data ln -f $path/apps.json $path/drivers/firefox/data
ln -f $path/icons/*.png $path/drivers/firefox/data/images/icons 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/icons/*.svg $path/drivers/firefox/data/images/icons
ln -f $path/utils/*.js $path/drivers/firefox/data/js ln -f $path/utils/*.js $path/drivers/firefox/data/js
ln -f $path/wappalyzer.js $path/drivers/chrome/js ln -f $path/wappalyzer.js $path/drivers/chrome/js
ln -f $path/apps.json $path/drivers/chrome ln -f $path/apps.json $path/drivers/chrome
ln -f $path/icons/*.png $path/drivers/chrome/images/icons ln -f $path/icons/*.png $path/drivers/chrome/images/icons
ln -f $path/icons/*.svg $path/drivers/chrome/images/icons ln -f $path/icons/converted/*.png $path/drivers/chrome/images/icons/converted
ln -f $path/utils/*.js $path/drivers/chrome/js ln -f $path/utils/*.js $path/drivers/chrome/js
ln -f $path/wappalyzer.js $path/drivers/bookmarklet/js ln -f $path/wappalyzer.js $path/drivers/bookmarklet/js
ln -f $path/icons/*.png $path/drivers/bookmarklet/images/icons ln -f $path/icons/*.png $path/drivers/bookmarklet/images/icons
ln -f $path/icons/*.svg $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/wappalyzer.js $path/drivers/html/js
ln -f $path/apps.json $path/drivers/html ln -f $path/apps.json $path/drivers/html
ln -f $path/icons/*.png $path/drivers/html/images/icons ln -f $path/icons/*.png $path/drivers/html/images/icons
ln -f $path/icons/*.svg $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/wappalyzer.js $path/drivers/php/js
ln -f $path/apps.json $path/drivers/php ln -f $path/apps.json $path/drivers/php
ln -f $path/wappalyzer.js $path/drivers/python/js ln -f $path/wappalyzer.js $path/drivers/python/js
ln -f $path/apps.json $path/drivers/python ln -f $path/apps.json $path/drivers/python
ln -f $path/wappalyzer.js $path/drivers/phantomjs ln -f $path/wappalyzer.js $path/drivers/phantomjs
ln -f $path/apps.json $path/drivers/phantomjs ln -f $path/apps.json $path/drivers/phantomjs
ln -f $path/wappalyzer.js $path/drivers/ruby/js ln -f $path/wappalyzer.js $path/drivers/ruby/js
ln -f $path/apps.json $path/drivers/ruby ln -f $path/apps.json $path/drivers/ruby
ln -f $path/wappalyzer.js $path/drivers/npm ln -f $path/wappalyzer.js $path/drivers/npm
ln -f $path/apps.json $path/drivers/npm ln -f $path/apps.json $path/drivers/npm
echo "OK" echo "OK"

@ -8,8 +8,8 @@ ENV WAPPALYZER_ROOT /home/wappalyzer/synced
ENV WAPPALYZER_NODE_PATH /home/wappalyzer/node ENV WAPPALYZER_NODE_PATH /home/wappalyzer/node
# Install packages # Install packages
RUN apt-get update && apt-get install -y curl zip libfreetype6 libfontconfig RUN apt-get update && apt-get install -y sudo curl bzip2 zip libfreetype6 libfontconfig
RUN curl -sL https://deb.nodesource.com/setup_4.x | bash - RUN curl -sL https://deb.nodesource.com/setup_6.x | bash -
RUN apt-get install -y nodejs RUN apt-get install -y nodejs
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
@ -27,21 +27,23 @@ RUN echo "cd \$WAPPALYZER_ROOT" >> .bashrc
RUN echo "wappalyzer" >> .bashrc RUN echo "wappalyzer" >> .bashrc
# PhantomJS
# RUN su wappalyzer -c "\
# mkdir phantomjs && \
# curl -L https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 | tar xvjC phantomjs && \
# ln -s /home/wappalyzer/phantomjs/phantomjs-*-linux-x86_64/bin/phantomjs /usr/bin/phantomjs"
# Node JS # Node JS
RUN su wappalyzer -c "mkdir $WAPPALYZER_NODE_PATH" RUN su wappalyzer -c "mkdir $WAPPALYZER_NODE_PATH"
ADD node/package.json $WAPPALYZER_NODE_PATH/package.json ADD node/package.json $WAPPALYZER_NODE_PATH/package.json
RUN npm i -g npm svg2png --prefix=/usr/local
RUN ln -s -f /usr/local/bin/npm /usr/bin/npm
RUN su wappalyzer -c "cd $WAPPALYZER_NODE_PATH && npm i" RUN su wappalyzer -c "cd $WAPPALYZER_NODE_PATH && npm i"
# PhantomJS
RUN su wappalyzer -c "\
mkdir phantomjs && \
curl -L https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2 | tar xvjC phantomjs && \
ln -s /home/wappalyzer/phantomjs/phantomjs-*-linux-x86_64/bin/phantomjs bin/phantomjs"
# SSH # SSH
RUN rm -f /etc/service/sshd/down RUN rm -f /etc/service/sshd/down
RUN su wappalyzer -c "mkdir .ssh && chmod 700 .ssh" RUN su wappalyzer -c "mkdir .ssh && chmod 700 .ssh"

@ -18,6 +18,7 @@
"jsonlint": "*", "jsonlint": "*",
"jpm": "*", "jpm": "*",
"imagemin-cli": "*", "imagemin-cli": "*",
"phantomjs-prebuilt": "*",
"svgo": "*" "svgo": "*"
}, },
"engines": { "engines": {

@ -6722,12 +6722,12 @@
"cats": [ "cats": [
12 12
], ],
"script": "strapdown\\.js", "icon": "strapdown.js.png",
"implies": [ "implies": [
"Twitter Bootstrap", "Twitter Bootstrap",
"Google Code Prettify" "Google Code Prettify"
], ],
"icon": "strapdown.js.png", "script": "strapdown\\.js",
"website": "strapdownjs.com" "website": "strapdownjs.com"
}, },
"Strato": { "Strato": {
@ -9117,56 +9117,56 @@
} }
}, },
"categories": { "categories": {
"1": "cms", "1": "CMS",
"2": "message-boards", "2": "Message Boards",
"3": "database-managers", "3": "Database Managers",
"4": "documentation-tools", "4": "Documentation Tools",
"5": "widgets", "5": "Widgets",
"6": "ecommerce", "6": "Ecommerce",
"7": "photo-galleries", "7": "Photo Galleries",
"8": "wikis", "8": "Wikis",
"9": "hosting-panels", "9": "Hosting Panels",
"10": "analytics", "10": "Analytics",
"11": "blogs", "11": "Blogs",
"12": "javascript-frameworks", "12": "Javascript Frameworks",
"13": "issue-trackers", "13": "Issue Trackers",
"14": "video-players", "14": "Video Players",
"15": "comment-systems", "15": "Comment Systems",
"16": "captchas", "16": "Captchas",
"17": "font-scripts", "17": "Font Scripts",
"18": "web-frameworks", "18": "Web Frameworks",
"19": "miscellaneous", "19": "Miscellaneous",
"20": "editors", "20": "Editors",
"21": "lms", "21": "LMS",
"22": "web-servers", "22": "Web Servers",
"23": "cache-tools", "23": "Cache Tools",
"24": "rich-text-editors", "24": "Rich Text Editors",
"25": "javascript-graphics", "25": "Javascript Graphics",
"26": "mobile-frameworks", "26": "Mobile Frameworks",
"27": "programming-languages", "27": "Programming Languages",
"28": "operating-systems", "28": "Operating Systems",
"29": "search-engines", "29": "Search Engines",
"30": "web-mail", "30": "Web Mail",
"31": "cdn", "31": "CDN",
"32": "marketing-automation", "32": "Marketing Automation",
"33": "web-server-extensions", "33": "Web Server Extensions",
"34": "databases", "34": "Databases",
"35": "maps", "35": "Maps",
"36": "advertising-networks", "36": "Advertising Networks",
"37": "network-devices", "37": "Network Devices",
"38": "media-servers", "38": "Media Servers",
"39": "webcams", "39": "Webcams",
"40": "printers", "40": "Printers",
"41": "payment-processors", "41": "Payment Processors",
"42": "tag-managers", "42": "Tag Managers",
"43": "paywalls", "43": "Paywalls",
"44": "build-ci-systems", "44": "Build CI Systems",
"45": "control-systems", "45": "Control Systems",
"46": "remote-access", "46": "Remote Access",
"47": "dev-tools", "47": "Dev Tools",
"48": "network-storage", "48": "Network Storage",
"49": "feed-readers", "49": "Feed Readers",
"50": "document-management-systems", "50": "Document Management Systems",
"51": "landing-page-builders" "51": "Landing Page Builders"
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 926 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 635 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 752 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 800 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 780 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 834 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 734 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 851 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 964 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 842 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -192,8 +192,14 @@
w.driver.categoryOrder.forEach(function(match) { w.driver.categoryOrder.forEach(function(match) {
for ( appName in w.detected[url] ) { for ( appName in w.detected[url] ) {
w.apps[appName].cats.forEach(function(cat) { w.apps[appName].cats.forEach(function(cat) {
var icon = w.apps[appName].icon;
if ( cat == match && !found ) { if ( cat == match && !found ) {
chrome.pageAction.setIcon({ tabId: tab.id, path: 'images/icons/' + w.apps[appName].icon }); if ( /\.svg$/i.test(icon) ) {
icon = 'converted/' + icon + '.png';
}
chrome.pageAction.setIcon({ tabId: tab.id, path: 'images/icons/' + icon });
found = true; found = true;
} }

@ -1,9 +1,14 @@
document.addEventListener('DOMContentLoaded', function() { document.addEventListener('DOMContentLoaded', function() {
var var
d = document, slugify, popup,
detectedApps = d.getElementById('detected-apps'); d = document,
detectedApps = d.getElementById('detected-apps');
var popup = { slugify = function(string) {
return string.toLowerCase().replace(/ /g, '-').replace(/[^\w-]/g, '');
};
popup = {
init: function() { init: function() {
d.getElementById('options').addEventListener('click', function() { d.getElementById('options').addEventListener('click', function() {
window.open(chrome.extension.getURL('options.html')); window.open(chrome.extension.getURL('options.html'));
@ -34,14 +39,14 @@ document.addEventListener('DOMContentLoaded', function() {
html = html =
'<div class="detected-app">' + '<div class="detected-app">' +
'<a target="_blank" href="https://wappalyzer.com/applications/' + appName.toLowerCase().replace(/ /g, '-').replace(/[^\w-]/g, '') + '?pk_campaign=chrome&pk_kwd=popup">' + '<a target="_blank" href="https://wappalyzer.com/applications/' + slugify(appName) + '?pk_campaign=chrome&pk_kwd=popup">' +
'<img src="images/icons/' + response.apps[appName].icon + '"/>' + '<img src="images/icons/' + response.apps[appName].icon + '"/>' +
'<span class="label"><span class="name">' + appName + '</span>' + ( version ? ' ' + version : '' ) + ( confidence < 100 ? ' (' + confidence + '% sure)' : '' ) + '</span>' + '<span class="label"><span class="name">' + appName + '</span>' + ( version ? ' ' + version : '' ) + ( confidence < 100 ? ' (' + confidence + '% sure)' : '' ) + '</span>' +
'</a>'; '</a>';
response.apps[appName].cats.forEach(function(cat) { response.apps[appName].cats.forEach(function(cat) {
html += html +=
'<a target="_blank" href="https://wappalyzer.com/categories/' + response.categories[cat] + '?pk_campaign=chrome&pk_kwd=popup">' + '<a target="_blank" href="https://wappalyzer.com/categories/' + slugify(response.categories[cat]) + '?pk_campaign=chrome&pk_kwd=popup">' +
'<span class="category"><span class="name">' + chrome.i18n.getMessage('categoryName' + cat) + '</span></span>' + '<span class="category"><span class="name">' + chrome.i18n.getMessage('categoryName' + cat) + '</span></span>' +
'</a>'; '</a>';
}); });

@ -1,7 +1,7 @@
{ "name": "Wappalyzer", { "name": "Wappalyzer",
"homepage_url": "https://wappalyzer.com?pk_campaign=chrome&pk_kwd=context", "homepage_url": "https://wappalyzer.com?pk_campaign=chrome&pk_kwd=context",
"description": "Identifies software on the web", "description": "Identifies software on the web",
"version": "2.47", "version": "2.48",
"default_locale": "en", "default_locale": "en",
"manifest_version": 2, "manifest_version": 2,
"icons": { "icons": {

@ -1,11 +1,15 @@
(function() { (function() {
self.port.on('displayApps', function(message) { self.port.on('displayApps', function(message) {
var var
div, a, img, label, name, div, a, img, label, name, slugify,
d = document, d = document,
detectedApps = d.getElementById('detected-apps'), detectedApps = d.getElementById('detected-apps'),
empty = d.getElementById('empty'); empty = d.getElementById('empty');
slugify = function(string) {
return string.toLowerCase().replace(/ /g, '-').replace(/[^\w-]/g, '');
};
while ( detectedApps.firstChild ) { while ( detectedApps.firstChild ) {
detectedApps.removeChild(detectedApps.firstChild); detectedApps.removeChild(detectedApps.firstChild);
} }
@ -31,7 +35,7 @@
a.addEventListener('click', function(e) { a.addEventListener('click', function(e) {
e.preventDefault(); e.preventDefault();
self.port.emit('goToUrl', 'applications/' + appName.toLowerCase().replace(/ /g, '-').replace(/[^\w-]/g, '')); self.port.emit('goToUrl', 'applications/' + slugify(appName));
}); });
}(appName)); }(appName));
@ -64,7 +68,7 @@
a.addEventListener('click', function(e) { a.addEventListener('click', function(e) {
e.preventDefault(); e.preventDefault();
self.port.emit('goToUrl', 'categories/' + message.categories[cat]); self.port.emit('goToUrl', 'categories/' + slugify(message.categories[cat]));
}); });
}(appName)); }(appName));

@ -8,7 +8,7 @@
"description": "Identifies software on the web", "description": "Identifies software on the web",
"author": "Elbert Alias", "author": "Elbert Alias",
"license": "GPLv3", "license": "GPLv3",
"version": "3.2.5", "version": "3.2.6",
"main": "driver.js", "main": "driver.js",
"preferences": [{ "preferences": [{
"name": "tracking", "name": "tracking",