You are on page 1of 29

: [ 7 ],

"html": "<!--phpalbum [\\.\\d\\s]+-->",


"implies": [ "PHP" ]
},
"phpBB": {
"cats": [ 2 ],
"meta": { "copyright": "phpBB Group" },
"html": "(Powered by <a[^>]+phpbb|<a[^>]+phpbb[^>]
+class=.copyright|\tphpBB style name|<[^>]+styles/(sub|pro)silver/theme|<img[^>]
+i_icon_mini|<table class=\\\"forumline)",
"env": "^(style_cookie_settings|phpbb_)",
"headers": { "Set-Cookie": "^phpbb" },
"implies": [ "PHP" ]
},
"phpCMS": {
"cats": [ 1 ],
"env": "^phpcms",
"implies": [ "PHP" ]
},
"phpDocumentor": {
"cats": [ 4 ],
"html": "<!-- Generated by phpDocumentor",
"implies": [ "PHP" ]
},
"PHP-Fusion": {
"cats": [ 1 ],
"html": "Powered by <a href=\\\"[^>]+php-fusion",
"implies": [ "PHP" ]
},
"phpMyAdmin": {
"cats": [ 3 ],
"html": "(var pma_absolute_uri = '|PMA_sendHeaderLocation\\(|
<title>phpMyAdmin</title>)",
"implies": [ "PHP" ]
},
"PHP-Nuke": {
"cats": [ 2 ],
"meta": { "generator": "PHP-Nuke" },
"html": "<[^>]+Powered by PHP-Nuke"
},
"phpPgAdmin": {
"cats": [ 3 ],
"html": "(<title>phpPgAdmin</title>|<span
class=\\\"appname\\\">phpPgAdmin)",
"implies": [ "PHP" ]
},
"phpSQLiteCMS": {
"cats": [ 1 ],
"meta": { "generator": "^phpSQLiteCMS" },
"implies": [ "PHP" ]
},
"phpwind": {
"cats": [ 1, 2 ],
"meta": { "generator": "^phpwind" },
"html": "Powered by <a href=\\\".+phpwind\\.net",
"implies": [ "PHP" ]
},
"Piwik": {
"cats": [ 10 ],
"html": "var piwikTracker = Piwik\\.getTracker\\(",
"env": "^Piwik$"
},
"Plentymarkets": {
"cats": [ 6 ],
"meta": { "generator": "^www\\.plentyMarkets" }
},
"Plesk": {
"cats": [ 9 ],
"headers": { "X-Powered-By-Plesk": "Plesk", "X-Powered-By":
"PleskLin" },
"script": "common\\.js\\?plesk"
},
"Pligg": {
"cats": [ 1 ],
"meta": { "generator": "Pligg" },
"html": "<span[^>]+id=\\\"xvotes-0",
"env": "^pligg_"
},
"Plone": {
"cats": [ 1 ],
"meta": { "generator": "Plone" },
"implies": [ "Python" ]
},
"Plura": {
"cats": [ 19 ],
"html": "<iframe src=\\\".+pluraserver\\.com"
},
"Po.st": {
"cats": [ 5 ],
"env": "^pwidget_config$"
},
"Posterous": {
"cats": [ 1, 11 ],
"html": "<div class=\\\"posterous",
"env": "^Posterous"
},
"Powergap": {
"cats": [ 6 ],
"html": "(s\\d\\d)\\.php\\?shopid=\\1"
},
"Prestashop": {
"cats": [ 6 ],
"meta": { "generator": "PrestaShop" },
"html": "Powered by <a href=\\\"[^>]+PrestaShop",
"implies": [ "PHP" ]
},
"Prototype": {
"cats": [ 12 ],
"script": "(prototype|protoaculous)\\.js",
"env": "^Prototype$"
},
"Protovis": {
"cats": [ 25 ],
"script": "protovis.*\\.js",
"env": "^protovis$"
},
"punBB": {
"cats": [ 2 ],
"html": "Powered by <a href=\\\"[^>]+punbb",
"implies": [ "PHP" ]
},
"Python": {
"cats": [ 27 ]
},
"Quantcast": {
"cats": [ 10 ],
"script": "edge\\.quantserve\\.com/quant\\.js",
"env": "^quantserve$"
},
"Quick.Cart": {
"cats": [ 6 ],
"html": "<a href=\\\"[^>]+opensolution\\.org/\\\">Powered by"
},
"RackCache": {
"cats": [ 23 ],
"headers": { "X-Rack-Cache": ".+" },
"implies": [ "Ruby" ]
},
"Raphael": {
"cats": [ 25 ],
"script": "raphael.*\\.js",
"env": "^Raphael$"
},
"RBS Change": {
"cats": [ 1, 6 ],
"html": "<html[^>]+xmlns:change=",
"meta": { "generator": "RBS Change" },
"implies": [ "PHP" ]
},
"RCMS": {
"cats": [ 1 ],
"meta": { "generator": "(RCMS|ReallyCMS)" }
},
"reCAPTCHA": {
"cats": [ 16 ],
"script": "(api-secure\\.recaptcha\\.net|recaptcha_ajax\\.js)",
"html": "<div[^>]+id=\\\"recaptcha_image",
"env": "^Recaptcha$"
},
"Red Hat": {
"cats": [ 28 ],
"headers": { "Server": "(Red Hat|rhel\\d+)", "X-Powered-By": "Red
Hat" }
},
"Reddit": {
"cats": [ 2 ],
"html": "(<script[^>]+>var reddit = {|<a[^>]+Powered by Reddit|
powered by <a[^>]+>reddit<)",
"url": "^(www\\.)?reddit\\.com",
"env": "^reddit$",
"implies": [ "Python" ]
},
"Redmine": {
"cats": [ 13 ],
"meta": { "description": "Redmine" },
"html": "Powered by <a href=\\\"[^>]+Redmine",
"implies": [ "Ruby on Rails" ]
},
"Reinvigorate": {
"cats": [ 10 ],
"html": "reinvigorate\\.track\\(\\\""
},
"RequireJS": {
"cats": [ 12 ],
"script": "require.*\\.js",
"env": "^requirejs$"
},
"RoundCube": {
"cats": [ 30 ],
"html": "<title>RoundCube",
"env": "^(rcmail|rcube_|roundcube)",
"implies": [ "PHP" ]
},
"Ruby": {
"cats": [ 27 ],
"headers": { "Server": "(Mongrel|WEBrick|Ruby)" }
},
"Ruby on Rails": {
"cats": [ 18 ],
"script": "/assets/application-[a-z\\d]{32}/\\.js",
"meta": { "csrf-param": "authenticity_token" },
"headers": { "Server": "(mod_rails|mod_rack|
Phusion\\.Passenger)", "X-Powered-By": "(mod_rails|mod_rack|
Phusion\\.Passenger)" },
"implies": [ "Ruby" ]
},
"S.Builder": {
"cats": [ 1 ],
"meta": { "generator": "S\\.Builder" }
},
"s9y": {
"cats": [ 1 ],
"meta": { "generator": "Serendipity", "Powered-By": "Serendipity"
}
},
"script.aculo.us": {
"cats": [ 12 ],
"script": "(scriptaculous|protoaculous)\\.js",
"env": "^Scriptaculous$"
},
"SDL Tridion": {
"cats": [ 1 ],
"html": "mfinfo\\.application='Tridion"
},
"Sencha Touch": {
"cats": [ 12, 26 ],
"script": "sencha-touch.*\\.js"
},
"Seoshop": {
"cats": [ 6 ],
"html": "http://www\\.getseoshop\\.com"
},
"ShareThis": {
"cats": [ 5 ],
"script": "w\\.sharethis\\.com/",
"env": "^SHARETHIS$"
},
"Shopalize": {
"cats": [ 5, 10 ],
"env": "^Shopalize$"
},
"Shopify": {
"cats": [ 6 ],
"html": "<link[^>]+=cdn\\.shopify\\.com",
"env": "^Shopify$"
},
"Shopware": {
"cats": [ 6 ],
"meta": { "application-name": "Shopware" },
"script": "shopware\\.js",
"implies": [ "PHP" ]
},
"sIFR": {
"cats": [ 17 ],
"script": "sifr\\.js"
},
"SilverStripe": {
"cats": [ 1 ],
"meta": { "generator": "SilverStripe" },
"html": "Powered by <a href=\\\"[^>]+SilverStripe"
},
"Site Meter": {
"cats": [ 10 ],
"script": "sitemeter\\.com/js/counter\\.js\\?site="
},
"SiteCatalyst": {
"cats": [ 10 ],
"html": "var s_code=s\\.t\\(\\);if\\(s_code\\)document\\.write\\
(s_code\\)",
"env": "^s_account$"
},
"SiteEdit": {
"cats": [ 1 ],
"meta": { "generator": "SiteEdit" }
},
"Smartstore": {
"cats": [ 6 ],
"script": "smjslib\\.js"
},
"SMF": {
"cats": [ 2 ],
"html": "<script [^>]+\\s+var smf_",
"env": "^smf_",
"implies": [ "PHP" ]
},
"sNews": {
"cats": [ 1 ],
"meta": { "generator": "sNews" }
},
"Snoobi": {
"cats": [ 10 ],
"script": "snoobi\\.com/snoop\\.php",
"env": "^snoobi$",
"implies": [ "Joomla" ]
},
"SOBI 2": {
"cats": [ 19 ],
"html": "(<!-- start of Sigsiu Online Business Index|<div[^>]*
class=\\\"sobi2)",
"implies": [ "Joomla" ]
},
"SobiPro": {
"cats": [ 19 ],
"env": "^SobiProUrl$",
"html": " <(script|link)[^>].*com_sobipro.*>",
"implies": [ "Joomla" ]
},
"SoundManager": {
"cats": [ 12 ],
"env": "^(SoundManager|BaconPlayer)$"
},
"SPDY": {
"cats": [ 19 ],
"headers": { "X-Firefox-Spdy": ".*" }
},
"Sphinx": {
"cats": [ 4 ],
"env": "^DOCUMENTATION_OPTIONS$",
"implies": [ "Python" ]
},
"SPIP": {
"cats": [ 1 ],
"meta": { "generator": "SPIP" },
"headers": { "X-Spip-Cache": ".*" }
},
"SQL Buddy": {
"cats": [ 3 ],
"html": "(<title>SQL Buddy</title>|<[^>]
+onclick=\\\"sideMainClick\\(\\\"home\\.php)"
},
"Squarespace": {
"cats": [ 1 ],
"html": "Squarespace\\.Constants\\.CURRENT_MODULE_ID"
},
"Squiz Matrix": {
"cats": [ 1 ],
"meta": { "generator": "Squiz Matrix" },
"html": " Running (MySource|Squiz) Matrix", "X-Powered-By":
"Squiz Matrix",
"implies": [ "PHP" ]
},
"StatCounter": {
"cats": [ 10 ],
"script": "statcounter\\.com/counter/counter"
},
"Store Systems": {
"cats": [ 6 ],
"html": "Shopsystem von <a href=.+store-
systems\\.de\\\"|\\.mws_boxTop"
},
"SublimeVideo": {
"cats": [ 14 ],
"script": "cdn\\.sublimevideo\\.net/js/[a-z\\d]+\\.js",
"env": "^sublimevideo$"
},
"SWFObject": {
"cats": [ 19 ],
"script": "swfobject.*\\.js",
"env": "^SWFObject$"
},
"swift.engine": {
"cats": [ 1 ],
"headers": { "X-Powered-By": "swift\\.engine" }
},
"Swiftlet": {
"cats": [ 18 ],
"meta": { "generator": "Swiftlet" },
"html": "Powered by <a href=\\\"[^>]+Swiftlet",
"headers": { "X-Swiftlet-Cache": ".*", "X-Powered-By":
"Swiftlet", "X-Generator": "Swiftlet" },
"implies": [ "PHP" ]
},
"Textpattern CMS": {
"cats": [ 1 ],
"meta": { "generator": "Textpattern" }
},
"three.js": {
"cats": [ 25 ],
"script": "three\\.js",
"env": "^THREE$"
},
"Tiki Wiki CMS Groupware": {
"cats": [ 1, 2, 8, 11, 13 ],
"script": "(/|_)tiki",
"meta": { "generator": "^Tiki" }
},
"Timeplot": {
"cats": [ 25 ],
"script": "timeplot.*\\.js",
"env": "^Timeplot$"
},
"TinyMCE": {
"cats": [ 24 ],
"env": "^tinyMCE$"
},
"Tealeaf": {
"cats": [ 10 ],
"env": "^TeaLeaf$"
},
"TomatoCart": {
"cats": [ 6 ],
"meta": { "generator": "TomatoCart" },
"env": "^AjaxShoppingCart$"
},
"Trac": {
"cats": [ 13 ],
"html": "<a id=\\\"tracpowered",
"implies": [ "Python" ]
},
"Tumblr": {
"cats": [ 11 ],
"html": "<iframe src=\\\".+tumblr\\.com",
"url": "^(www.)?.+\\.tumblr\\.com",
"headers": { "X-Tumblr-Usec": ".*" }
},
"Twilight CMS": {
"cats": [ 1 ],
"headers": { "X-Powered-CMS": "Twilight CMS" }
},
"Twitter Bootstrap": {
"cats": [ 18 ],
"script": "twitter\\.github\\.com/bootstrap",
"html": "<link[^>]+bootstrap[^>]+css",
"env": "^Twipsy$"
},
"Typekit": {
"cats": [ 17 ],
"script": "use\\.typekit\\.com",
"env": "^Typekit$"
},
"TypePad": {
"cats": [ 11 ],
"meta": { "generator": "typepad" },
"url": "^(www.)?.+\\.typepad\\.com"
},
"TYPO3": {
"cats": [ 1 ],
"headers": { "Set-Cookie": "fe_typo_user" },
"meta": { "generator": "TYPO3" },
"html": "(<(script[^>]* src|link[^>]* href)=[^>]*fileadmin|<!--
TYPO3SEARCH)",
"url": "/typo3/",
"implies": [ "PHP" ]
},
"Ubercart": {
"cats": [ 6 ],
"script": "uc_cart/uc_cart_block\\.js",
"implies": [ "Drupal" ]
},
"Ubuntu": {
"cats": [ 28 ],
"headers": { "Server": "Ubuntu", "X-Powered-By": "Ubuntu" }
},
"Umbraco": {
"cats": [ 1 ],
"meta": { "generator": "umbraco" },
"headers": { "X-Umbraco-Version": ".+" },
"html": "powered by <a href=[^>]+umbraco",
"implies": [ "Microsoft ASP.NET" ]
},
"Underscore.js": {
"cats": [ 12 ],
"script": "underscore.*\\.js"
},
"UNIX": {
"cats": [ 28 ],
"headers": { "Server": "Unix" }
},
"UserRules": {
"cats": [ 13 ],
"html": "var _usrp =",
"env": "^_usrp$"
},
"UserVoice": {
"cats": [ 13 ],
"env": "^UserVoice$"
},
"Vanilla": {
"cats": [ 2 ],
"html": "<body id=\\\"(DiscussionsPage|vanilla)",
"headers": { "X-Powered-By": "Vanilla" },
"implies": [ "PHP" ]
},
"Varnish": {
"cats": [ 23 ],
"headers": { "X-Varnish": ".+", "X-Varnish-Age": ".+", "X-
Varnish-Cache": ".+", "X-Varnish-Action": ".+", "X-Varnish-Hostname": ".+", "Via":
"Varnish" }
},
"vBulletin": {
"cats": [ 2 ],
"meta": { "generator": "vBulletin" },
"env": "^(vBulletin|vB_[^g])",
"implies": [ "PHP" ]
},
"VideoJS": {
"cats": [ 14 ],
"env": "^VideoJS$",
"html": "<div.+class=\\\"video-js+\\\">",
"script": "zencdn\\.net/c/video\\.js"
},
"viennaCMS": {
"cats": [ 1 ],
"html": "powered by <a href=\\\"[^>]+viennacms"
},
"Vignette": {
"cats": [ 1 ],
"html": "<[^>]+?=\\\"(vgn-ext|vgnext)"
},
"Vimeo": {
"cats": [ 14 ],
"html": "<(param|embed)[^>]+vimeo\\.com/moogaloop|
<iframe[^>]player\\.vimeo\\.com"
},
"VirtueMart": {
"cats": [ 6 ],
"html": "<div id=\\\"vmMainPage"
},
"VisualPath": {
"cats": [ 10 ],
"script": "visualpath[^/]*\\.trackset\\.it/[^/]
+/track/include\\.js"
},
"VIVVO": {
"cats": [ 1 ],
"headers": { "Set-Cookie": "VivvoSessionId" },
"env": "^vivvo"
},
"Volusion": {
"cats": [ 6 ],
"html": "/v/vspfiles(/.)*/css/.+\\.css"
},
"Vox": {
"cats": [ 11 ],
"url": "^(www.)?.+\\.vox\\.com"
},
"VP-ASP": {
"cats": [ 6 ],
"script": "vs350\\.js",
"html": "<a[^>]+>Powered By VP-ASP Shopping Cart</a>",
"implies": [ "Microsoft ASP.NET" ]
},
"W3Counter": {
"cats": [ 10 ],
"script": "w3counter\\.com/tracker\\.js"
},
"W3 Total Cache": {
"cats": [ 23 ],
"html": "<!--[^>]+W3 Total Cache",
"implies": [ "WordPress" ]
},
"Web Optimizer": {
"cats": [ 10 ],
"html": "<title [^>]*lang=\\\"wo\\\">"
},
"webEdition": {
"cats": [ 1 ],
"meta": { "generator": "webEdition", "DC.title": "webEdition" }
},
"WebGUI": {
"cats": [ 1 ],
"meta": { "generator": "WebGUI" }
},
"WebPublisher": {
"cats": [ 1 ],
"meta": { "generator": "WEB\\|Publisher" }
},
"Websale": {
"cats": [ 6 ],
"url": "/websale7/"
},
"WebsiteBaker": {
"cats": [ 1 ],
"meta": { "generator": "WebsiteBaker" },
"implies": [ "PHP" ]
},
"Webtrekk": {
"cats": [ 10 ],
"html": "var webtrekk = new Object"
},
"Webtrends": {
"cats": [ 10 ],
"html": "<img[^>]+id=\\\"DCSIMG\\\"[^>]+webtrends",
"env": "^(WTOptimize|WebTrends)"
},
"Weebly": {
"cats": [ 1 ],
"html": "<[^>]+class=\\\"weebly"
},
"WikkaWiki": {
"cats": [ 8 ],
"meta": { "generator": "WikkaWiki" },
"html": "Powered by <a href=\\\"[^>]+WikkaWiki"
},
"Windows Server": {
"cats": [ 28 ],
"headers": { "Server": "Win32" }
},
"Wink": {
"cats": [ 26, 12 ],
"script": "(_base/js/base|wink).*\\.js",
"env": "^wink$"
},
"Wolf CMS": {
"cats": [ 1 ],
"html": "(<a href=\\\"[^>]+wolfcms\\.org.+Wolf CMS.+inside|Thank
you for using <a[^>]+>Wolf CMS)"
},
"Woopra": {
"cats": [ 10 ],
"script": "static\\.woopra\\.com"
},
"WordPress": {
"cats": [ 1, 11 ],
"meta": { "generator": "WordPress" },
"html": "<link rel=\\\"stylesheet\\\" [^>]+wp-content",
"env": "^wp_username$",
"implies": [ "PHP" ]
},
"WordPress Super Cache": {
"cats": [ 23 ],
"html": "<!--[^>]+WP-Super-Cache",
"implies": [ "WordPress" ]
},
"Xajax": {
"cats": [ 12 ],
"script": "xajax_core.*\\.js"
},
"Xanario": {
"cats": [ 6 ],
"meta": { "generator": "xanario shopsoftware" }
},
"XenForo": {
"cats": [ 2 ],
"html": "jQuery\\.extend\\(true, XenForo|Forum software by
XenForo&trade;|<!--XF:branding"
},
"XiTi": {
"cats": [ 10 ],
"html": "(<[^>]+src=\\\"[^>]+xiti\\.com/hit\\.xiti)",
"env": "^Xt_"
},
"XMB": {
"cats": [ 2 ],
"html": "<!-- Powered by XMB"
},
"XOOPS": {
"cats": [ 1 ],
"meta": { "generator": "XOOPS" },
"env": "^xoops",
"implies": [ "PHP" ]
},
"xtCommerce": {
"cats": [ 6 ],
"meta": { "generator": "xt:Commerce" },
"html": "<div class=\\\"copyright\\\">.+<a[^>]+>xt:Commerce"
},
"xui": {
"cats": [ 26, 12 ],
"script": "[^a-zA-Z]xui.*\\.js",
"env": "^xui$"
},
"YaBB": {
"cats": [ 2 ],
"html": "Powered by <a href=\\\"[^>]+yabbforum"
},
"Yahoo! Web Analytics": {
"cats": [ 10 ],
"script": "d\\.yimg\\.com/mi/ywa\\.js"
},
"Yandex.Metrika": {
"cats": [ 10 ],
"script": "mc\\.yandex\\.ru/metrika/watch\\.js"
},
"YouTube": {
"cats": [ 14 ],
"html": "<(param|embed|iframe)[^>]+youtube(-nocookie)?\\.com/(v|
embed)"
},
"YUI Doc": {
"cats": [ 4 ],
"html": "<html[^>]* yuilibrary\\.com/rdf/[\\d.]+/yui\\.rdf"
},
"YUI": {
"cats": [ 12 ],
"script": "/yui/|yui\\.yahooapis\\.com",
"env": "^YAHOO$"
},
"Zen Cart": {
"cats": [ 6 ],
"meta": { "generator": "Zen Cart" }
},
"Zend": {
"cats": [ 22 ],
"headers": { "X-Powered-By": "Zend" }
},
"Zepto": {
"cats": [ 12 ],
"script": "zepto.*\\.js",
"env": "^Zepto$"
},
"Zinnia": {
"cats": [ 11 ],
"meta": { "generator": "Zinnia" },
"implies": [ "Django" ]
},
"ZK": {
"cats": [ 18 ],
"script": "zkau/",
"html": "<!-- ZK [\\.\\d\\s]+-->",
"implies": [ "Java" ]
}
}
}
##############################################################################/**
* Firefox driver
*/

(function() {
//'use strict';

if ( wappalyzer == null ) return;

var w = wappalyzer, prefs, strings;

const
d = document,
Cc = Components.classes,
Ci = Components.interfaces
;

w.driver = {
lastDisplayed: null,

/**
* Log messages to console
*/
log: function(args) {
if ( prefs != null && prefs.getBoolPref('debug') ) {

Cc['@mozilla.org/consoleservice;1'].getService(Ci.nsIConsoleService).logStringMessa
ge(args.message);
}
},

/**
* Initialize
*/
init: function(callback) {
var handler = function() {
window.removeEventListener('load', handler, false);

w.log('w.driver: browser window loaded');

strings = d.getElementById('wappalyzer-strings');

// Read apps.json
var xhr =
Cc['@mozilla.org/xmlextras/xmlhttprequest;1'].createInstance(Ci.nsIXMLHttpRequest);

xhr.overrideMimeType('application/json');

xhr.open('GET', 'chrome://wappalyzer/content/apps.json',
true);

xhr.onload = function() {
var json = JSON.parse(xhr.responseText);

w.categories = json.categories;
w.apps = json.apps;
};

xhr.send(null);

AddonManager.getAddonByID('wappalyzer@crunchlabz.com',
function(addon) {
// Preferences
prefs = Cc['@mozilla.org/preferences-
service;1'].getService(Ci.nsIPrefService).getBranch('extensions.wappalyzer.');

prefs.addObserver('', w.driver, false);

container();

bindings();

// Version check
addon.version = addon.version;

if ( !prefs.getCharPref('version') ) {
w.config.firstRun = true;
} else if ( prefs.getCharPref('version') !=
addon.version ) {
w.config.upgraded = true;
}

prefs.setCharPref('version', addon.version);

// Listen for messages from content script


messageManager.addMessageListener('wappalyzer',
content);

// Load content script

messageManager.loadFrameScript('chrome://wappalyzer/content/js/content.js',
true);

gBrowser.addProgressListener({
// Listen for location changes
onLocationChange: function(progress, request,
location, flags) {
w.driver.displayApps();
},

// Get response headers


onStateChange: function(progress, request,
flags, status) {
if ( !prefs.getBoolPref('analyzeHeaders')
) { return; }

if ( request != null && flags &


Ci.nsIWebProgressListener.STATE_STOP ) {
if ( request.nsIHttpChannel &&
request.contentType == 'text/html' ) {
if ( progress.currentURI &&
request.name == progress.currentURI.spec ) {
var headers = new
Object();

request.nsIHttpChannel.visitResponseHeaders(function(header, value) {
headers[header] =
value;
});

w.analyze(progress.currentURI.host, progress.currentURI.spec, { headers:


headers });
}
}
}
}
});

gBrowser.tabContainer.addEventListener('TabSelect',
w.driver.displayApps, false);

callback();
});
};

window.addEventListener('load', handler, false);


window.addEventListener('unload', w.driver.track, false);
},

// Observe preference changes


observe: function(subject, topic, data) {
if ( topic != 'nsPref:changed' ) { return; }

switch(data) {
case 'addonBar':
container();

break;
}

w.driver.displayApps();
},

/**
* Display apps
*/
displayApps: function() {
var
i, j, elements, menuItem, menuSeparator, image,
remove = [],
container = d.getElementById('wappalyzer-container'),
menu = d.getElementById('wappalyzer-applications'),
url = gBrowser.currentURI.spec.split('#')[0]
;

if ( !container ) { return; }

if ( w.detected[url] != null && w.detected[url].length ) {


// No change
if ( w.driver.lastDisplayed ===
JSON.stringify(w.detected[url]) ) { return; }
} else {
if ( w.driver.lastDisplayed === 'empty' ) { return; }
}

elements = {
images: container.getElementsByTagName('image'),
menuItems: menu .getElementsByTagName('menuitem'),
menuSeparators: menu
.getElementsByTagName('menuseparator')
};

for ( i in elements ) {
for ( j = elements[i].length - 1; j >= 0; j -- ) {
remove.push(elements[i][j]);
}
}

if ( w.detected[url] != null && w.detected[url].length ) {


if ( !prefs.getBoolPref('showIcons') ) {
image = d.createElement('image');

image.setAttribute('src',
'chrome://wappalyzer/skin/images/icon_hot.png');

container.appendChild(image);
}

w.detected[url].map(function(app, i) {
var j, cat, showCat, categories = [];

for ( i in w.apps[app].cats ) {
showCat = false;

try {
showCat = prefs.getBoolPref('cat' +
w.apps[app].cats[i]);
} catch(e) { }

if ( showCat ) {
menuSeparator =
d.createElement('menuseparator');
menuItem =
d.createElement('menuitem');

menuItem.setAttribute('class',
'wappalyzer-application menuitem-iconic');
menuItem.setAttribute('image',
'chrome://wappalyzer/skin/images/icons/' + app + '.png');
menuItem.setAttribute('label', app);
menuItem.setAttribute('name', app);

menuItem.addEventListener('command',
function() {
w.driver.goToURL({ url:
w.config.websiteURL + 'applications/' + app.toLowerCase().replace(/ /g,
'-').replace(/[^\w-]/g, '') });
});

menu.appendChild(menuSeparator);
menu.appendChild(menuItem);

for ( j in w.apps[app].cats ) {
cat = w.apps[app].cats[j];

categories.push(strings.getString('wappalyzer.cat' + cat));

menuItem =
d.createElement('menuitem');

menuItem.setAttribute('class',
'wappalyzer-category');
menuItem.setAttribute('label',
strings.getString('wappalyzer.cat' + cat));

menuItem.addEventListener('command', function() {
w.driver.goToURL({ url:
w.config.websiteURL + 'categories/' + w.categories[cat] });
});

menu.appendChild(menuItem);
}

if ( prefs.getBoolPref('showIcons') ) {
image = d.createElement('image');

image.setAttribute('src',
'chrome://wappalyzer/skin/images/icons/' + app + '.png');
image.setAttribute('tooltiptext',
app + ' - ' + categories.join(', '));

container.appendChild(image);
}

break;
}
}
});

w.driver.lastDisplayed = JSON.stringify(w.detected[url]);
} else {
image = d.createElement('image');
menuSeparator = d.createElement('menuseparator');
menuItem = d.createElement('menuitem');

image.setAttribute('src',
'chrome://wappalyzer/skin/images/icon.png');

menuItem.setAttribute('disabled', 'true');
menuItem.setAttribute('label',
strings.getString('wappalyzer.noAppsDetected'));

container.appendChild(image);
menu .appendChild(menuSeparator);
menu .appendChild(menuItem);

w.driver.lastDisplayed = 'empty';
}

for ( i in remove ) {
remove[i].parentNode.removeChild(remove[i]);
}
},

/**
* Go to URL
*/
goToURL: function(args) {
gBrowser.selectedTab = gBrowser.addTab(args.url + '?
utm_source=firefox&utm_medium=extension&utm_campaign=extensions');
},

/**
* Anonymously track detected applications for research purposes
*/
ping: function() {
if ( Object.keys(w.ping.hostnames).length &&
prefs.getBoolPref('tracking') ) {
// Make POST request
var request = new XMLHttpRequest();

request.open('POST', w.config.websiteURL + 'ping/', true);

request.setRequestHeader('Content-type', 'application/x-
www-form-urlencoded');

request.onreadystatechange = function(e) {
if ( request.readyState == 4 )
{ w.log('w.driver.ping: status ' + request.status); }
};

request.send('json=' +
encodeURIComponent(JSON.stringify(w.ping)));

w.log('w.driver.ping: ' + JSON.stringify(w.ping));

w.ping = {};
}
}
};

/**
* Content message listener
*/
function content(msg) {
w.log('content.js');

switch ( msg.json.action ) {
case 'analyze':
w.analyze(msg.json.hostname, msg.json.url,
msg.json.analyze);

break;
case 'get prefs':
return {
analyzeJavaScript:
prefs.getBoolPref('analyzeJavaScript'),
analyzeOnLoad: prefs.getBoolPref('analyzeOnLoad')
};

break;
}

msg = null;
}

/**
* Move container to address or addon bar
*/
function container() {
if ( prefs.getBoolPref('addonBar') ) {
d.getElementById('wappalyzer-
addonbar').appendChild(d.getElementById('wappalyzer-container'));
} else {
d.getElementById('urlbar-
icons').insertBefore(d.getElementById('wappalyzer-container'),
d.getElementById('urlbar-icons').childNodes[0]);
}

d.getElementById('wappalyzer-addonbar').setAttribute('collapsed',
prefs.getBoolPref('addonBar') ? 'false' : 'true');
}

/**
* Bindings
*/
function bindings() {
// Menu items
var prefix = 'wappalyzer-menu-';

d.getElementById(prefix + 'preferences').onclick = function() {


w.driver.goToURL({ url:
'chrome://wappalyzer/content/xul/preferences.xul' })
};

d.getElementById(prefix + 'feedback').onclick = function() {


w.driver.goToURL({ url: w.config.websiteURL + 'contact' })
};

d.getElementById(prefix + 'website').onclick = function() {


w.driver.goToURL({ url: w.config.websiteURL })
};

d.getElementById(prefix + 'github').onclick = function() {


w.driver.goToURL({ url: w.config.githubURL })
};

d.getElementById(prefix + 'twitter').onclick = function() {


w.driver.goToURL({ url: w.config.twitterURL })
};
}
w.init();
})();
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
##############/**
* Wappalyzer v2
*
* Created by Elbert F <info@elbertf.com>
*
* License: GPLv3 http://www.gnu.org/licenses/gpl-3.0.txt
*/

var wappalyzer = (function() {


//'use strict';

/**
* Call driver functions
*/
var driver = function(func, args) {
if ( typeof w.driver[func] !== 'function' ) {
w.log('not implemented: w.driver.' + func, 'warn');

return;
}

if ( func !== 'log' ) { w.log('w.driver.' + func); }

return w.driver[func](args);
};
/**
* Main script
*/
var w = {
apps: null,
cats: null,
ping: {},
detected: [],

config: {
environment: 'dev', // dev | live

version: false,

websiteURL: 'http://wappalyzer.com/',
twitterURL: 'https://twitter.com/Wappalyzer',
githubURL: 'https://github.com/ElbertF/Wappalyzer',

firstRun: false,
upgraded: false
},

/**
* Log messages to console
*/
log: function(message, type) {
if ( w.config.environment === 'dev' ) {
if ( type == null ) { type = 'debug'; }

driver('log', { message: '[wappalyzer ' + type + '] ' +


message, type: type });
}
},

/**
* Initialize
*/
init: function() {
w.log('w.init');

// Checks
if ( w.driver == null ) {
w.log('no driver, exiting');
G
return;
}

// Initialize driver
driver('init', function() {
if ( w.config.firstRun ) {
driver('goToURL', { url: w.config.websiteURL +
'installed' });

w.config.firstRun = false;
}

if ( w.config.upgraded ) {
driver('goToURL', { url: w.config.websiteURL +
'upgraded' });

w.config.upgraded = false;
}
});
},

/**
* Analyze the request
*/
analyze: function(hostname, url, data) {
w.log('w.analyze');

url = url.split('#')[0];

data.url = url;

if ( w.apps == null || w.categories == null ) {


w.log('apps.json not loaded');

return;
}

if ( w.detected[url] == null ) {
w.detected[url] = [];
}

var
i, app, type, regex, regexMeta, regexScript, match,
content, meta, header,
profiler = {
regexCount: 0,
startTime: ( new Date ).getTime()
},
apps = []
;

appLoop:
for ( app in w.apps ) {
// Skip if the app has already been detected
if ( w.detected[url].indexOf(app) !== -1 ||
apps.indexOf(app) !== -1 ) {
continue;
}

for ( type in w.apps[app] ) {


switch ( type ) {
case 'url':
regex = new RegExp(w.apps[app]
[type].replace('/', '\\\/'), 'i');

profiler.regexCount ++;

if ( regex.test(url) ) {
apps.push(app);

continue appLoop;
}
break;
case 'html':
if ( data[type] == null ) {
break;
}

regex = new RegExp(w.apps[app]


[type].replace('/', '\\\/'), 'i');

profiler.regexCount ++;

if ( regex.test(data[type]) ) {
apps.push(app);

continue appLoop;
}

break;
case 'script':
if ( data.html == null ) {
break;
}

regex = new RegExp(w.apps[app]


[type].replace('/', '\\\/'), 'i');
regexScript = new RegExp('<script[^>]
+src=("|\')([^"\']+)', 'ig');

profiler.regexCount ++;

while ( match =
regexScript.exec(data.html) ) {
profiler.regexCount ++;

if ( regex.test(match[2]) ) {
apps.push(app);

continue appLoop;
}
}

break;
case 'meta':
if ( data.html == null ) {
break;
}

profiler.regexCount ++;

regexMeta = /<meta[^>]+>/ig;

while ( match = regexMeta.exec(data.html)


) {
for ( meta in w.apps[app][type] ) {
profiler.regexCount ++;

if ( new RegExp('name=["\']'
+ meta + '["\']', 'i').test(match) ) {
content =
match.toString().match(/content=("|')([^"']+)("|')/i);

regex = new
RegExp(w.apps[app].meta[meta].replace('/', '\\\/'), 'i');

profiler.regexCount ++;

if ( content &&
content.length === 4 && regex.test(content[2]) ) {
apps.push(app);

continue appLoop;
}
}
}
}

break;
case 'headers':
if ( data[type] == null ) {
break;
}

for ( header in w.apps[app].headers ) {


regex = new RegExp(w.apps[app]
[type][header].replace('/', '\\\/'), 'i');

profiler.regexCount ++;

if ( data[type][header] != null &&


regex.test(data[type][header]) ) {
apps.push(app);

continue appLoop;
}
}

break;
case 'env':
if ( data[type] == null ) {
break;
}

regex = RegExp(w.apps[app]
[type].replace('/', '\\\/'), 'i');

for ( i in data[type] ) {
profiler.regexCount ++;

if ( regex.test(data[type][i]) ) {
apps.push(app);

continue appLoop;
}
}

break;
}
}
}

w.log('Tested ' + profiler.regexCount + ' regular expressions in


' + ( ( ( new Date ).getTime() - profiler.startTime ) / 1000 ) + 's');

// Implied applications
var i, j, k, implied;

for ( i = 0; i < 3; i ++ ) {
for ( j in apps ) {
if ( w.apps[apps[j]] && w.apps[apps[j]].implies ) {
for ( k in w.apps[apps[j]].implies ) {
implied = w.apps[apps[j]].implies[k];

if ( !w.apps[implied] ) {
w.log('Implied application ' +
implied + ' does not exist');

continue;
}

if ( w.detected[url].indexOf(implied) ===
-1 && apps.indexOf(implied) === -1 ) {
apps.push(implied);
}
}
}
}
}

w.log(apps.length + ' apps detected: ' + apps.join(', ') + ' on '


+ url);

// Keep history of detected apps


var i, app, regex, regexMeta, match;

for ( i in apps ) {
app = apps[i];

// Per hostname
if ( /^[a-z0-9._\-]+\.[a-z]+/.test(hostname) && !/((local|
dev|development|stage|staging|test|testing|demo|
admin)\.|\/admin|\.local)/.test(url) ) {
if ( typeof w.ping.hostnames === 'undefined' ) {
w.ping.hostnames = {};
}

if ( typeof w.ping.hostnames[hostname] ===


'undefined' ) {
w.ping.hostnames[hostname] = { applications:
{}, meta: {} };
}

if ( typeof
w.ping.hostnames[hostname].applications[app] === 'undefined' ) {
w.ping.hostnames[hostname].applications[app] =
1;
}
w.ping.hostnames[hostname].applications[app] ++;
}

// Per URL
if ( w.detected[url].indexOf(app) === -1 )
{ w.detected[url].push(app); }
}

// Additional information
if ( typeof w.ping.hostnames !== 'undefined' && typeof
w.ping.hostnames[hostname] !== 'undefined' ) {
if ( data.html != null ) {
match = data.html.match(/<html[^>]*[: ]lang="([a-z]
{2}((-|_)[A-Z]{2})?)"/i);

if ( match != null && match.length ) {


w.ping.hostnames[hostname].meta['language'] =
match[1];
}

regexMeta = /<meta[^>]+>/ig;

while ( match = regexMeta.exec(data.html) ) {


if ( !match.length ) { continue; }

match = match[0].match(/name="(author|
copyright|country|description|keywords)"[^>]*content="([^"]+)"/i);

if ( match && match.length === 3 ) {


w.ping.hostnames[hostname].meta[match[1]]
= match[2];
}
}
}

w.log(hostname + ': ' +


JSON.stringify(w.ping.hostnames[hostname]));
}

if ( w.ping.hostnames != null &&


Object.keys(w.ping.hostnames).length >= 50 ) { driver('ping'); }

apps = null;
data = null;

driver('displayApps');
}
};

return w;
})();

// CommonJS package
// See http://wiki.commonjs.org/wiki/CommonJS
if ( typeof exports === 'object' ) {
exports.wappalyzer = wappalyzer;
}
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
############wappalyzer.name = Wappalyzer
wappalyzer.noAppsDetected = No applications detected
wappalyzer.addonBar = Wappalyzer has been placed in the add-on bar.\n\nTo
show the add-on bar, close this window and press Ctrl+/.

wappalyzer.cat1 = CMS
wappalyzer.cat2 = Message Board
wappalyzer.cat3 = Database Manager
wappalyzer.cat4 = Documentation Tool
wappalyzer.cat5 = Widget
wappalyzer.cat6 = Web Shop
wappalyzer.cat7 = Photo Gallery
wappalyzer.cat8 = Wiki
wappalyzer.cat9 = Hosting Panel
wappalyzer.cat10 = Analytics
wappalyzer.cat11 = Blog
wappalyzer.cat12 = JavaScript Framework
wappalyzer.cat13 = Issue Tracker
wappalyzer.cat14 = Video Player
wappalyzer.cat15 = Comment System
wappalyzer.cat16 = CAPTCHA
wappalyzer.cat17 = Font Script
wappalyzer.cat18 = Web Framework
wappalyzer.cat19 = Miscellaneous
wappalyzer.cat20 = Editor
wappalyzer.cat21 = LMS
wappalyzer.cat22 = Web Server
wappalyzer.cat23 = Cache Tool
wappalyzer.cat24 = Rich Text Editor
wappalyzer.cat25 = Javascript Graphics
wappalyzer.cat26 = Mobile Framework
wappalyzer.cat27 = Programming Language
wappalyzer.cat28 = Operating System
wappalyzer.cat29 = Search Engine
wappalyzer.cat30 = Web Mail
wappalyzer.cat31 = CDN
wappalyzer.cat32 = Marketing Automation
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
###################################################################################
#########################################<!ENTITY wappalyzer.name
"Wappalyzer">
<!ENTITY wappalyzer.help "Wappalyzer - Cliquer pour plus de détails et
options">

<!ENTITY wappalyzer.showIcons "Montrer les icônes des applications">


<!ENTITY wappalyzer.preferences "Plus d'options...">
<!ENTITY wappalyzer.addonBar "Placer dans la barre des modules">
<!ENTITY wappalyzer.categories "Gérer les catégories">
<!ENTITY wappalyzer.performance "Performance">
<!ENTITY wappalyzer.interface "Interface">
<!ENTITY wappalyzer.tracking "Traçage">
<!ENTITY wappalyzer.research "Envoyer anonymement des rapports sur les
applications détectées à wappalyzer.com pour la recherche">
<!ENTITY wappalyzer.analyzeHeaders "Analyser les headers">
<!ENTITY wappalyzer.analyzeJavaScript "Analyser le JavaScript">
<!ENTITY wappalyzer.analyzeOnload "Analyser les évènements au chargement">

<!ENTITY wappalyzer.feedback "Donner votre avis">


<!ENTITY wappalyzer.github "Github">
<!ENTITY wappalyzer.twitter "Twitter">
<!ENTITY wappalyzer.website "Aller à wappalyzer.com">

<!ENTITY wappalyzer.cat1 "CMS">


<!ENTITY wappalyzer.cat2 "Forums">
<!ENTITY wappalyzer.cat3 "Gestionnaires de base de données">
<!ENTITY wappalyzer.cat4 "Outils de documentation">
<!ENTITY wappalyzer.cat5 "Widgets">
<!ENTITY wappalyzer.cat6 "Boutiques en ligne">
<!ENTITY wappalyzer.cat7 "Galeries photo">
<!ENTITY wappalyzer.cat8 "Wikis">
<!ENTITY wappalyzer.cat9 "Gestionnaires de serveur">
<!ENTITY wappalyzer.cat10 "Outils de statistiques">
<!ENTITY wappalyzer.cat11 "Blogs">
<!ENTITY wappalyzer.cat12 "Frameworks JavaScript ">
<!ENTITY wappalyzer.cat13 "Outils de suivi de problèmes">
<!ENTITY wappalyzer.cat14 "Lecteurs de vidéos">
<!ENTITY wappalyzer.cat15 "Systèmes de commentaires">
<!ENTITY wappalyzer.cat16 "CAPTCHAs">
<!ENTITY wappalyzer.cat17 "Script de police">
<!ENTITY wappalyzer.cat18 "Frameworks web">
<!ENTITY wappalyzer.cat19 "Divers">
<!ENTITY wappalyzer.cat20 "Editeurs">
<!ENTITY wappalyzer.cat21 "LMS">
<!ENTITY wappalyzer.cat22 "Serveurs web">
<!ENTITY wappalyzer.cat23 "Outils de cache">
<!ENTITY wappalyzer.cat24 "Editeurs WYSIWYG">
<!ENTITY wappalyzer.cat25 "Graphismes JavaScript">
<!ENTITY wappalyzer.cat26 "Frameworks pour mobiles">
<!ENTITY wappalyzer.cat27 "Languages de programmation">
<!ENTITY wappalyzer.cat28 "Systèmes d'exploitation">
<!ENTITY wappalyzer.cat29 "Moteurs de recherche">
<!ENTITY wappalyzer.cat30 "Web Mail">
<!ENTITY wappalyzer.cat31 "CDN">
<!E

You might also like