diff --git a/.gitignore b/.gitignore index 4cb371265..af6546711 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,8 @@ build/* drivers/npm/node_modules drivers/npm/npm-debug.log +src/icons/converted/* + package.json node_modules/ npm-debug.log diff --git a/bin/wappalyzer-build b/bin/wappalyzer-build index 0d48405a1..cb1389954 100755 --- a/bin/wappalyzer-build +++ b/bin/wappalyzer-build @@ -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 diff --git a/bin/wappalyzer-links b/bin/wappalyzer-links index 2afbfada0..12a6bddf1 100755 --- a/bin/wappalyzer-links +++ b/bin/wappalyzer-links @@ -27,41 +27,41 @@ path="$path/src" echo "Creating hard links..." -ln -f $path/wappalyzer.js $path/drivers/firefox/lib -ln -f $path/apps.json $path/drivers/firefox/data -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/utils/*.js $path/drivers/firefox/data/js +ln -f $path/wappalyzer.js $path/drivers/firefox/lib +ln -f $path/apps.json $path/drivers/firefox/data +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/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/utils/*.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/icons/*.png $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 -ln -f $path/icons/*.png $path/drivers/bookmarklet/images/icons -ln -f $path/icons/*.svg $path/drivers/bookmarklet/images/icons +ln -f $path/wappalyzer.js $path/drivers/bookmarklet/js +ln -f $path/icons/*.png $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/apps.json $path/drivers/html -ln -f $path/icons/*.png $path/drivers/html/images/icons -ln -f $path/icons/*.svg $path/drivers/html/images/icons +ln -f $path/wappalyzer.js $path/drivers/html/js +ln -f $path/apps.json $path/drivers/html +ln -f $path/icons/*.png $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/apps.json $path/drivers/php +ln -f $path/wappalyzer.js $path/drivers/php/js +ln -f $path/apps.json $path/drivers/php -ln -f $path/wappalyzer.js $path/drivers/python/js -ln -f $path/apps.json $path/drivers/python +ln -f $path/wappalyzer.js $path/drivers/python/js +ln -f $path/apps.json $path/drivers/python -ln -f $path/wappalyzer.js $path/drivers/phantomjs -ln -f $path/apps.json $path/drivers/phantomjs +ln -f $path/wappalyzer.js $path/drivers/phantomjs +ln -f $path/apps.json $path/drivers/phantomjs -ln -f $path/wappalyzer.js $path/drivers/ruby/js -ln -f $path/apps.json $path/drivers/ruby +ln -f $path/wappalyzer.js $path/drivers/ruby/js +ln -f $path/apps.json $path/drivers/ruby -ln -f $path/wappalyzer.js $path/drivers/npm -ln -f $path/apps.json $path/drivers/npm +ln -f $path/wappalyzer.js $path/drivers/npm +ln -f $path/apps.json $path/drivers/npm echo "OK" diff --git a/docker/Dockerfile b/docker/Dockerfile index 625b6bf14..d8c6fd4a4 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -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" diff --git a/docker/node/package.json b/docker/node/package.json index b75954434..0bf01f87d 100644 --- a/docker/node/package.json +++ b/docker/node/package.json @@ -18,6 +18,7 @@ "jsonlint": "*", "jpm": "*", "imagemin-cli": "*", + "phantomjs-prebuilt": "*", "svgo": "*" }, "engines": { diff --git a/src/apps.json b/src/apps.json index 24b3d0bfc..fbdb441ea 100755 --- a/src/apps.json +++ b/src/apps.json @@ -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" } } \ No newline at end of file diff --git a/src/drivers/chrome/images/icons/converted/.gitkeep b/src/drivers/chrome/images/icons/converted/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/src/drivers/chrome/images/icons/converted/Angular.svg.png b/src/drivers/chrome/images/icons/converted/Angular.svg.png new file mode 100644 index 000000000..ed9e10cd3 Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/Angular.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/Apache.svg.png b/src/drivers/chrome/images/icons/converted/Apache.svg.png new file mode 100644 index 000000000..09e3c24ad Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/Apache.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/Bigcommerce.svg.png b/src/drivers/chrome/images/icons/converted/Bigcommerce.svg.png new file mode 100644 index 000000000..b10abfa83 Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/Bigcommerce.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/Bounce Exchange.svg.png b/src/drivers/chrome/images/icons/converted/Bounce Exchange.svg.png new file mode 100644 index 000000000..6cb4d7494 Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/Bounce Exchange.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/Captch Me.svg.png b/src/drivers/chrome/images/icons/converted/Captch Me.svg.png new file mode 100644 index 000000000..f82f3d8f0 Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/Captch Me.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/CloudFlare.svg.png b/src/drivers/chrome/images/icons/converted/CloudFlare.svg.png new file mode 100644 index 000000000..1bb04bd94 Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/CloudFlare.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/Criteo.svg.png b/src/drivers/chrome/images/icons/converted/Criteo.svg.png new file mode 100644 index 000000000..a64f7cf0e Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/Criteo.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/Disqus.svg.png b/src/drivers/chrome/images/icons/converted/Disqus.svg.png new file mode 100644 index 000000000..0c18bfcae Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/Disqus.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/DoubleClick.svg.png b/src/drivers/chrome/images/icons/converted/DoubleClick.svg.png new file mode 100644 index 000000000..0d63a3226 Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/DoubleClick.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/ExagonConcept.svg.png b/src/drivers/chrome/images/icons/converted/ExagonConcept.svg.png new file mode 100644 index 000000000..5942704b9 Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/ExagonConcept.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/GitLab.svg.png b/src/drivers/chrome/images/icons/converted/GitLab.svg.png new file mode 100644 index 000000000..27f76dd4f Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/GitLab.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/Google AdSense.svg.png b/src/drivers/chrome/images/icons/converted/Google AdSense.svg.png new file mode 100644 index 000000000..60003100b Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/Google AdSense.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/Google Analytics.svg.png b/src/drivers/chrome/images/icons/converted/Google Analytics.svg.png new file mode 100644 index 000000000..d93caf9fd Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/Google Analytics.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/HP.svg.png b/src/drivers/chrome/images/icons/converted/HP.svg.png new file mode 100644 index 000000000..351064ceb Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/HP.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/IBM.svg.png b/src/drivers/chrome/images/icons/converted/IBM.svg.png new file mode 100644 index 000000000..bd5634814 Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/IBM.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/Lightspeed.svg.png b/src/drivers/chrome/images/icons/converted/Lightspeed.svg.png new file mode 100644 index 000000000..6035eb7c9 Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/Lightspeed.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/Marionette.js.svg.png b/src/drivers/chrome/images/icons/converted/Marionette.js.svg.png new file mode 100644 index 000000000..613c98ebc Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/Marionette.js.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/Microsoft.svg.png b/src/drivers/chrome/images/icons/converted/Microsoft.svg.png new file mode 100644 index 000000000..d5f68770d Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/Microsoft.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/MotoCMS.svg.png b/src/drivers/chrome/images/icons/converted/MotoCMS.svg.png new file mode 100644 index 000000000..07054ebbd Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/MotoCMS.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/MySQL.svg.png b/src/drivers/chrome/images/icons/converted/MySQL.svg.png new file mode 100644 index 000000000..c1b6bbf4a Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/MySQL.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/Nginx.svg.png b/src/drivers/chrome/images/icons/converted/Nginx.svg.png new file mode 100644 index 000000000..c312c5cd5 Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/Nginx.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/PDF.js.svg.png b/src/drivers/chrome/images/icons/converted/PDF.js.svg.png new file mode 100644 index 000000000..9d6209a79 Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/PDF.js.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/Penguin.svg.png b/src/drivers/chrome/images/icons/converted/Penguin.svg.png new file mode 100644 index 000000000..2268f62f2 Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/Penguin.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/Sails.js.svg.png b/src/drivers/chrome/images/icons/converted/Sails.js.svg.png new file mode 100644 index 000000000..908d8d41a Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/Sails.js.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/Shopery.svg.png b/src/drivers/chrome/images/icons/converted/Shopery.svg.png new file mode 100644 index 000000000..6dc81665b Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/Shopery.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/Shopify.svg.png b/src/drivers/chrome/images/icons/converted/Shopify.svg.png new file mode 100644 index 000000000..bc4cee791 Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/Shopify.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/Shoptet.svg.png b/src/drivers/chrome/images/icons/converted/Shoptet.svg.png new file mode 100644 index 000000000..19269bf2f Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/Shoptet.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/SilverStripe.svg.png b/src/drivers/chrome/images/icons/converted/SilverStripe.svg.png new file mode 100644 index 000000000..6dfa92ff1 Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/SilverStripe.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/Sulu.svg.png b/src/drivers/chrome/images/icons/converted/Sulu.svg.png new file mode 100644 index 000000000..e7b078b87 Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/Sulu.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/TYPO3.svg.png b/src/drivers/chrome/images/icons/converted/TYPO3.svg.png new file mode 100644 index 000000000..b239ee7e5 Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/TYPO3.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/Varnish.svg.png b/src/drivers/chrome/images/icons/converted/Varnish.svg.png new file mode 100644 index 000000000..21cc7439e Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/Varnish.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/WordPress.svg.png b/src/drivers/chrome/images/icons/converted/WordPress.svg.png new file mode 100644 index 000000000..a0116f367 Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/WordPress.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/caddy.svg.png b/src/drivers/chrome/images/icons/converted/caddy.svg.png new file mode 100644 index 000000000..6256fc495 Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/caddy.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/jQuery Mobile.svg.png b/src/drivers/chrome/images/icons/converted/jQuery Mobile.svg.png new file mode 100644 index 000000000..501839ca1 Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/jQuery Mobile.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/jQuery UI.svg.png b/src/drivers/chrome/images/icons/converted/jQuery UI.svg.png new file mode 100644 index 000000000..63fa6ac32 Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/jQuery UI.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/jQuery.svg.png b/src/drivers/chrome/images/icons/converted/jQuery.svg.png new file mode 100644 index 000000000..30f1e5330 Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/jQuery.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/pimcore.svg.png b/src/drivers/chrome/images/icons/converted/pimcore.svg.png new file mode 100644 index 000000000..f91e8d9cf Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/pimcore.svg.png differ diff --git a/src/drivers/chrome/images/icons/converted/webpack.svg.png b/src/drivers/chrome/images/icons/converted/webpack.svg.png new file mode 100644 index 000000000..9aa2526f3 Binary files /dev/null and b/src/drivers/chrome/images/icons/converted/webpack.svg.png differ diff --git a/src/drivers/chrome/js/driver.js b/src/drivers/chrome/js/driver.js index fdea9141c..0ddfd9045 100644 --- a/src/drivers/chrome/js/driver.js +++ b/src/drivers/chrome/js/driver.js @@ -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; } diff --git a/src/drivers/chrome/js/popup.js b/src/drivers/chrome/js/popup.js index 957b22b4f..b7c4d68d3 100644 --- a/src/drivers/chrome/js/popup.js +++ b/src/drivers/chrome/js/popup.js @@ -1,9 +1,14 @@ document.addEventListener('DOMContentLoaded', function() { var - d = document, - detectedApps = d.getElementById('detected-apps'); + 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 = '