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/npm-debug.log
src/icons/converted/*
package.json
node_modules/
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
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
# Npm Module

@ -36,7 +36,7 @@ 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/icons/converted/*.png $path/drivers/chrome/images/icons/converted
ln -f $path/utils/*.js $path/drivers/chrome/js
ln -f $path/wappalyzer.js $path/drivers/bookmarklet/js

@ -8,8 +8,8 @@ ENV WAPPALYZER_ROOT /home/wappalyzer/synced
ENV WAPPALYZER_NODE_PATH /home/wappalyzer/node
# Install packages
RUN apt-get update && apt-get install -y curl zip libfreetype6 libfontconfig
RUN curl -sL https://deb.nodesource.com/setup_4.x | bash -
RUN apt-get update && apt-get install -y sudo curl bzip2 zip libfreetype6 libfontconfig
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash -
RUN apt-get install -y nodejs
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
# 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
RUN su wappalyzer -c "mkdir $WAPPALYZER_NODE_PATH"
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"
# 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
RUN rm -f /etc/service/sshd/down
RUN su wappalyzer -c "mkdir .ssh && chmod 700 .ssh"

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

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

@ -1,9 +1,14 @@
document.addEventListener('DOMContentLoaded', function() {
var
slugify, popup,
d = document,
detectedApps = d.getElementById('detected-apps');
var popup = {
slugify = function(string) {
return string.toLowerCase().replace(/ /g, '-').replace(/[^\w-]/g, '');
};
popup = {
init: function() {
d.getElementById('options').addEventListener('click', function() {
window.open(chrome.extension.getURL('options.html'));
@ -34,14 +39,14 @@ document.addEventListener('DOMContentLoaded', function() {
html =
'<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 + '"/>' +
'<span class="label"><span class="name">' + appName + '</span>' + ( version ? ' ' + version : '' ) + ( confidence < 100 ? ' (' + confidence + '% sure)' : '' ) + '</span>' +
'</a>';
response.apps[appName].cats.forEach(function(cat) {
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>' +
'</a>';
});

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

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

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