From b81277a217517ff801d330d7da2d1b514150b56b Mon Sep 17 00:00:00 2001 From: Elbert Alias Date: Sat, 25 Feb 2017 13:25:58 +1100 Subject: [PATCH] Updated bookmarklet driver --- src/drivers/bookmarklet/css/wappalyzer.css | 118 ------------------ src/drivers/bookmarklet/{js => }/driver.js | 85 ++++--------- src/drivers/bookmarklet/images/icons/.gitkeep | 0 src/drivers/bookmarklet/images/pending.gif | Bin 3956 -> 0 bytes src/drivers/bookmarklet/index.html | 94 -------------- 5 files changed, 26 insertions(+), 271 deletions(-) delete mode 100644 src/drivers/bookmarklet/css/wappalyzer.css rename src/drivers/bookmarklet/{js => }/driver.js (67%) delete mode 100644 src/drivers/bookmarklet/images/icons/.gitkeep delete mode 100644 src/drivers/bookmarklet/images/pending.gif delete mode 100644 src/drivers/bookmarklet/index.html diff --git a/src/drivers/bookmarklet/css/wappalyzer.css b/src/drivers/bookmarklet/css/wappalyzer.css deleted file mode 100644 index 67836659c..000000000 --- a/src/drivers/bookmarklet/css/wappalyzer.css +++ /dev/null @@ -1,118 +0,0 @@ -div#wappalyzer-container * { - background-color: transparent !important; - border: none !important; - border-left: none !important; - border-top: none !important; - border-right: none !important; - border-bottom: none !important; - border-spacing: 0 !important; - color: inherit !important; - font-size: inherit !important; - font-weight: inherit !important; - font-family: inherit !important; - font-style: inherit !important; - line-height: inherit !important; - list-style: none inside !important; - margin: 0 !important; - outline: none !important; - padding: 0 !important; - text-align: inherit !important; - text-decoration: none !important; - white-space: inherit !important; -} - -#wappalyzer-container { - background: #fff !important; - border: 1px solid #999; - box-shadow: 0 0 10px rgba(0, 0, 0, .2) !important; - color: #222 !important; - font-family: Arial, sans-serif !important; - font-size: 14px !important; - line-height: 1.5em !important; - margin: 0 !important; - position: fixed !important; - text-align: left !important; - right: 20px !important; - top: 20px !important; - width: 250px !important; - z-index: 99999 !important; -} - - #wappalyzer-container #wappalyzer-pending { - background-repeat: no-repeat !important; - background-position: center center !important; - height: 60px !important; - } - - #wappalyzer-container a#wappalyzer-close:link, - #wappalyzer-container a#wappalyzer-close:hover, - #wappalyzer-container a#wappalyzer-close:active, - #wappalyzer-container a#wappalyzer-close:visited { - background: #f8f8f8 !important; - border-bottom: 1px solid #ccc !important; - display: block !important; - font-weight: bold !important; - line-height: 30px !important; - text-align: center !important; - } - - #wappalyzer-container #wappalyzer-close:hover { - background: #f4f4f4 !important; - color: #0072B6 !important; - } - - #wappalyzer-container #wappalyzer-empty { - border-bottom: 1px solid #ccc !important; - color: #999 !important; - display: block !important; - line-height: 30px !important; - text-align: center !important; - } - - #wappalyzer-container #wappalyzer-apps { - padding-top: 2px !important; - } - - #wappalyzer-container #wappalyzer-apps img { - vertical-align: middle !important; - } - - #wappalyzer-container #wappalyzer-apps a:link, - #wappalyzer-container #wappalyzer-apps a:hover, - #wappalyzer-container #wappalyzer-apps a:active, - #wappalyzer-container #wappalyzer-apps a:visited { - display: block !important; - text-decoration: none !important; - } - - #wappalyzer-container #wappalyzer-apps a:hover { - color: #0072B6 !important; - } - - #wappalyzer-container #wappalyzer-apps div.wappalyzer-app { - background: #fff !important; - border-radius: 5px !important; - -moz-border-radius: 5px !important; - -webkit-border-radius: 5px !important; - margin: 0 2px 2px 2px !important; - padding: 7px 10px !important; - } - - #wappalyzer-container #wappalyzer-apps a.wappalyzer-application:link, - #wappalyzer-container #wappalyzer-apps a.wappalyzer-application:hover, - #wappalyzer-container #wappalyzer-apps a.wappalyzer-application:active, - #wappalyzer-container #wappalyzer-apps a.wappalyzer-application:visited { - font-weight: bold !important; - margin-bottom: 3px !important; - } - - #wappalyzer-container #wappalyzer-apps a.wappalyzer-category:link, - #wappalyzer-container #wappalyzer-apps a.wappalyzer-category:hover, - #wappalyzer-container #wappalyzer-apps a.wappalyzer-category:active, - #wappalyzer-container #wappalyzer-apps a.wappalyzer-category:visited { - color: #999 !important; - } - - #wappalyzer-container #wappalyzer-apps a.wappalyzer-category:hover { - color: #0072B6 !important; - } diff --git a/src/drivers/bookmarklet/js/driver.js b/src/drivers/bookmarklet/driver.js similarity index 67% rename from src/drivers/bookmarklet/js/driver.js rename to src/drivers/bookmarklet/driver.js index dc6772365..16e5fb816 100644 --- a/src/drivers/bookmarklet/js/driver.js +++ b/src/drivers/bookmarklet/driver.js @@ -3,7 +3,9 @@ */ (function() { - if ( wappalyzer == null ) return; + if ( typeof wappalyzer === 'undefined' ) { + return; + } var w = wappalyzer, @@ -12,51 +14,7 @@ container = d.getElementById('wappalyzer-container'), domain = window.top.location.host, url = window.top.location.href, - hasOwn = Object.prototype.hasOwnProperty, - categoryNames = { - 1: 'CMS', - 2: 'Message Board', - 3: 'Database Manager', - 4: 'Documentation Tool', - 5: 'Widget', - 6: 'Web Shop', - 7: 'Photo Gallery', - 8: 'Wiki', - 9: 'Hosting Panel', - 10: 'Analytics', - 11: 'Blog', - 12: 'JavaScript Framework', - 13: 'Issue Tracker', - 14: 'Video Player', - 15: 'Comment System', - 16: 'Captcha', - 17: 'Font Script', - 18: 'Web Framework', - 19: 'Miscellaneous', - 20: 'Editor', - 21: 'LMS', - 22: 'Web Server', - 23: 'Cache Tool', - 24: 'Rich Text Editor', - 25: 'JavaScript Graphics', - 26: 'Mobile Framework', - 27: 'Programming Language', - 28: 'Operating System', - 29: 'Search Engine', - 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' - } - ; + hasOwn = Object.prototype.hasOwnProperty; w.driver = { timeout: 1000, @@ -81,9 +39,11 @@ getEnvironmentVars: function() { w.log('func: getEnvironmentVars'); - var env = new Array; + var i, env = []; - for ( i in window ) { env.push(i); } + for ( i in window ) { + env.push(i); + } w.analyze(domain, url, { html: d.documentElement.innerHTML, env: env }); }, @@ -105,6 +65,8 @@ var responseHeaders = {}; headers.forEach(function(line) { + var name, value; + if ( line ) { name = line.substring(0, line.indexOf(': ')); value = line.substring(line.indexOf(': ') + 2, line.length - 1); @@ -128,39 +90,40 @@ w.log('func: diplayApps'); var + i, first = true, + app, category, - html - ; + html; html = '' + 'Close' + '' + - '
' - ; + '
'; if ( w.detected[url] != null && Object.keys(w.detected[url]).length ) { for ( app in w.detected[url] ) { - if(!hasOwn.call(w.detected[url], app)) { + if ( !hasOwn.call(w.detected[url], app) ) { continue; } + html += '
' + '' + '' + ' ' + app + '' + - '' - ; + ''; for ( i in w.apps[app].cats ) { - if(!hasOwn.call(w.apps[app].cats, i)) { + if ( !hasOwn.call(w.apps[app].cats, i) ) { continue; } - category = w.apps[app].cats[i]; - html += '' + categoryNames[category] + ''; + category = w.categories[w.apps[app].cats[i]]; + + html += '' + category + ''; } html += '
'; @@ -181,7 +144,11 @@ */ goToURL: function(args) { window.open(args.url); - } + }, + + slugify = function(string) { + return string.toLowerCase().replace(/ /g, '-').replace(/[^\w-]/g, ''); + }; }; w.init(); diff --git a/src/drivers/bookmarklet/images/icons/.gitkeep b/src/drivers/bookmarklet/images/icons/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/drivers/bookmarklet/images/pending.gif b/src/drivers/bookmarklet/images/pending.gif deleted file mode 100644 index 3864c07973d33d77d6c4434367cfc7b1f460e97a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3956 zcmbW3X;f2p9)@ogvJgmaLV%EkECdoDY}Ugl#SW6~CIp5hP+>%p6iN)K)ffiIbvmW_l5h7U_j%s; z{i!voRjZ8xNC54Fpp`3DwzsxlxO5@&#mu{ZzN=5vmzS0g93N0bE3W8`fJlS?_;yzpl1!@bsWgtDCzuxA1VGX;;(0(SeoWE4ws@_{zPz%0@Z_LErI@=hxA4z}riP~8!@Wh@i!MxDhmr_?9O*TySX1c%}<;32{XcoG48%N8HF_%|WK!=YW95gGfnu`b)VHRA2q zvzgz#nIciR=%x8kxZ_?k%Miw#I=pI7_~KBt{IkGKv}bbU<9G5MS2L{{(zFk+2+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