sync to master

main
Caio Iglesias 11 years ago
commit 2e8b8e49c8

@ -1,10 +1,24 @@
(function() { (function() {
var url, json, app, categories, page; var
url,
originalUrl,
args = [],
debug = false;
try { try {
if ( require('system').args.length > 1 ) { require('system').args.forEach(function(arg) {
url = require('system').args[1]; switch ( arg ) {
} else { case '-v':
case '--verbose':
debug = true;
break;
default:
url = originalUrl = arg;
}
});
if ( !url ) {
throw new Error('Usage: phantomjs ' + require('system').args[0] + ' <url>'); throw new Error('Usage: phantomjs ' + require('system').args[0] + ' <url>');
} }
@ -17,23 +31,59 @@
* Log messages to console * Log messages to console
*/ */
log: function(args) { log: function(args) {
console.log(args.message); if ( debug || args.type !== 'debug' ) {
console.log(args.message);
}
}, },
/** /**
* Display apps * Display apps
*/ */
displayApps: function() { displayApps: function() {
var count = wappalyzer.detected[url] ? Object.keys(wappalyzer.detected[url]).length.toString() : '0'; var
app,
console.log(count); apps = [],
cats = [],
count = wappalyzer.detected[url] ? Object.keys(wappalyzer.detected[url]).length : 0;
wappalyzer.log('driver.displayApps');
if ( count ) {
for ( app in wappalyzer.detected[url] ) {
wappalyzer.apps[app].cats.forEach(function(cat) {
cats.push(wappalyzer.categories[cat]);
});
apps.push({
url: originalUrl,
finalUrl: url,
application: app,
confidence: wappalyzer.detected[url][app].confidenceTotal,
version: wappalyzer.detected[url][app].version,
categories: cats
});
}
console.log(JSON.stringify(apps));
}
}, },
/** /**
* Initialize * Initialize
*/ */
init: function() { init: function() {
json = JSON.parse(require('fs').read('apps.json')); var
page, hostname,
headers = {};
a = document.createElement('a'),
json = JSON.parse(require('fs').read('apps.json'));
wappalyzer.log('driver.init');
a.href = url.replace(/#.*$/, '');
hostname = a.hostname;
wappalyzer.apps = json.apps; wappalyzer.apps = json.apps;
wappalyzer.categories = json.categories; wappalyzer.categories = json.categories;
@ -41,19 +91,58 @@
page = require('webpage').create(); page = require('webpage').create();
page.onConsoleMessage = function(message) { page.onConsoleMessage = function(message) {
console.log(message); wappalyzer.log(message);
};
page.onResourceReceived = function(response) {
if ( response.url.replace(/\/$/, '') === url.replace(/\/$/, '') ) {
if ( response.redirectURL ) {
url = response.redirectURL;
return;
}
if ( response.stage === 'end' && response.contentType.indexOf('text/html') !== -1 ) {
response.headers.forEach(function(header) {
headers[header.name.toLowerCase()] = header.value;
});
}
}
}; };
page.open(url, function(status) { page.open(url, function(status) {
var a, hostname; var html, environmentVars;
if ( status === 'fail' ) {
return;
}
html = page.content;
if ( html.length > 50000 ) {
html = html.substring(0, 25000) + html.substring(html.length - 25000, html.length);
}
// Collect environment variables
environmentVars = page.evaluate(function() {
var i, environmentVars;
for ( i in window ) {
environmentVars += i + ' ';
}
a = document.createElement('a'); return environmentVars;
});
a.href = url.replace(/#.*$/, ''); wappalyzer.log({ message: 'environmentVars: ' + environmentVars });
hostname = a.hostname; environmentVars = environmentVars.split(' ').slice(0, 500);
wappalyzer.analyze(hostname, url, { html: page.content }); wappalyzer.analyze(hostname, url, {
html: html,
headers: headers,
env: environmentVars
});
phantom.exit(); phantom.exit();
}); });

@ -190,7 +190,7 @@
"Akamai": { "Akamai": {
"website": "akamai.com", "website": "akamai.com",
"cats": [ 31 ], "cats": [ 31 ],
"headers": { "X-Akamai-Transformed": ".*" } "headers": { "X-Akamai-Transformed": "" }
}, },
"Allegro RomPager": { "Allegro RomPager": {
"website": "allegrosoft.com/embedded-web-server-s2", "website": "allegrosoft.com/embedded-web-server-s2",
@ -312,7 +312,7 @@
"website": "jfrog.com/open-source/#os-arti", "website": "jfrog.com/open-source/#os-arti",
"cats": [ 47 ], "cats": [ 47 ],
"env": "^ArtifactoryUpdates$", "env": "^ArtifactoryUpdates$",
"script": [ "wicket/resource/org\\.artifactory." ], "script": [ "wicket/resource/org\\.artifactory\\." ],
"html": [ "<span class=\"version\">Artifactory(?: Pro)?(?: Power Pack)?(?: ([\\d.]+))?\\;version:\\1" ] "html": [ "<span class=\"version\">Artifactory(?: Pro)?(?: Power Pack)?(?: ([\\d.]+))?\\;version:\\1" ]
}, },
"AsciiDoc": { "AsciiDoc": {
@ -342,8 +342,8 @@
"website": "www.atlassian.com/software/confluence/overview/team-collaboration-software", "website": "www.atlassian.com/software/confluence/overview/team-collaboration-software",
"cats": [ 8 ], "cats": [ 8 ],
"html": "Powered by <a href=[^>]+atlassian\\.com/software/confluence(?:[^>]+>Atlassian Confluence</a> ([\\d.]+))?\\;version:\\1", "html": "Powered by <a href=[^>]+atlassian\\.com/software/confluence(?:[^>]+>Atlassian Confluence</a> ([\\d.]+))?\\;version:\\1",
"headers": { "X-Confluence-Request-Time": ".*" }, "headers": { "X-Confluence-Request-Time": "" },
"meta": { "confluence-request-time": ".*" }, "meta": { "confluence-request-time": "" },
"implies": "Java" "implies": "Java"
}, },
"Atlassian Jira": { "Atlassian Jira": {
@ -547,7 +547,7 @@
"Cargo": { "Cargo": {
"website": "cargocollective.com", "website": "cargocollective.com",
"cats": [ 1 ], "cats": [ 1 ],
"meta": { "cargo_title": ".*" }, "meta": { "cargo_title": "" },
"script": "/cargo\\.", "script": "/cargo\\.",
"html": "<link [^>]+Cargo feed", "html": "<link [^>]+Cargo feed",
"implies": "PHP" "implies": "PHP"
@ -575,7 +575,7 @@
"CacheFly": { "CacheFly": {
"website": "www.cachefly.com", "website": "www.cachefly.com",
"cats": [ 31 ], "cats": [ 31 ],
"headers": { "Server": "^CFS ", "X-CF1": ".+", "X-CF2": ".+" } "headers": { "Server": "^CFS ", "X-CF1": "", "X-CF2": "" }
}, },
"cgit": { "cgit": {
"website": "git.zx2c4.com/cgit/", "website": "git.zx2c4.com/cgit/",
@ -688,7 +688,7 @@
"Commerce Server": { "Commerce Server": {
"website": "commerceserver.net", "website": "commerceserver.net",
"cats": [ 6 ], "cats": [ 6 ],
"headers": { "COMMERCE-SERVER-SOFTWARE": ".+" }, "headers": { "COMMERCE-SERVER-SOFTWARE": "" },
"implies": "Microsoft ASP.NET" "implies": "Microsoft ASP.NET"
}, },
"CompaqHTTPServer": { "CompaqHTTPServer": {
@ -867,11 +867,6 @@
"meta": { "generator": "DataLife Engine" }, "meta": { "generator": "DataLife Engine" },
"implies": [ "PHP", "Apache" ] "implies": [ "PHP", "Apache" ]
}, },
"DAV": {
"website": "???",
"cats": [ 33 ],
"headers": { "Server": "\\bDAV\\b(?:/([\\d.]+))?\\;version:\\1" }
},
"David Webbox": { "David Webbox": {
"website": "www.tobit.com", "website": "www.tobit.com",
"cats": [ 22 ], "cats": [ 22 ],
@ -986,7 +981,7 @@
"cats": [ 1 ], "cats": [ 1 ],
"meta": { "generator": "DotNetNuke" }, "meta": { "generator": "DotNetNuke" },
"script": "/js/dnncore\\.js", "script": "/js/dnncore\\.js",
"headers": { "DNNOutputCache": ".+", "X-Compressed-By": "DotNetNuke", "Set-Cookie": "DotNetNukeAnonymous=" }, "headers": { "DNNOutputCache": "", "X-Compressed-By": "DotNetNuke", "Set-Cookie": "DotNetNukeAnonymous=" },
"html": "<!-- by DotNetNuke Corporation", "html": "<!-- by DotNetNuke Corporation",
"env": "^DotNetNuke$", "env": "^DotNetNuke$",
"implies": "Microsoft ASP.NET" "implies": "Microsoft ASP.NET"
@ -1013,7 +1008,7 @@
"cats": [ 1 ], "cats": [ 1 ],
"script": "drupal\\.js", "script": "drupal\\.js",
"html": "<(?:link|style)[^>]+sites/(?:default|all)/(?:themes|modules)/", "html": "<(?:link|style)[^>]+sites/(?:default|all)/(?:themes|modules)/",
"headers": { "X-Drupal-Cache": ".*", "X-Generator": "Drupal(?:\\s([\\d.]+))?\\;version:\\1", "Expires": "19 Nov 1978" }, "headers": { "X-Drupal-Cache": "", "X-Generator": "Drupal(?:\\s([\\d.]+))?\\;version:\\1", "Expires": "19 Nov 1978" },
"meta": { "generator": "Drupal(?:\\s([\\d.]+))?\\;version:\\1" }, "meta": { "generator": "Drupal(?:\\s([\\d.]+))?\\;version:\\1" },
"env": "^Drupal$", "env": "^Drupal$",
"implies": "PHP" "implies": "PHP"
@ -1254,7 +1249,7 @@
"cats": [ 1 ], "cats": [ 1 ],
"meta": { "generator": "FlexCMP" }, "meta": { "generator": "FlexCMP" },
"html": "<!--[^>]+FlexCMP[^>v]+v\\. ([\\d.]+)\\;version:\\1", "html": "<!--[^>]+FlexCMP[^>v]+v\\. ([\\d.]+)\\;version:\\1",
"headers": { "X-Powered-By": "FlexCMP.+\\[v\\. ([\\d.]+)\\;version:\\1", "X-Flex-Lang": ".+" } "headers": { "X-Powered-By": "FlexCMP.+\\[v\\. ([\\d.]+)\\;version:\\1", "X-Flex-Lang": "" }
}, },
"FluxBB": { "FluxBB": {
"website": "fluxbb.org", "website": "fluxbb.org",
@ -1348,7 +1343,7 @@
"website": "ghost.org", "website": "ghost.org",
"cats": [ 11 ], "cats": [ 11 ],
"meta": { "generator": "Ghost(?:\\s([\\d.]+))?\\;version:\\1" }, "meta": { "generator": "Ghost(?:\\s([\\d.]+))?\\;version:\\1" },
"headers": { "X-Ghost-Cache-Status": ".*" } "headers": { "X-Ghost-Cache-Status": "" }
}, },
"git": { "git": {
"website": "git-scm.com", "website": "git-scm.com",
@ -1518,7 +1513,8 @@
"Happy ICS Server": { "Happy ICS Server": {
"website": "???", "website": "???",
"cats": [ 22 ], "cats": [ 22 ],
"headers": { "Server": "Happy ICS Server(?:/([\\d.]+))?\\;version:\\1" } "headers": { "Server": "Happy ICS Server(?:/([\\d.]+))?\\;version:\\1" },
"implies": "OmniTouch 8660 My Teamwork"
}, },
"HeadJS": { "HeadJS": {
"website": "headjs.com", "website": "headjs.com",
@ -1599,7 +1595,7 @@
"HTTP-Server": { "HTTP-Server": {
"website": "???", "website": "???",
"cats": [ 22 ], "cats": [ 22 ],
"headers": { "Server": "\\bHTTP-Server(?: ?/?V?([\\d.]+))?\\;version:\\1" } "headers": { "Server": "(?:^|[^-])\\bHTTP-Server(?: ?/?V?([\\d.]+))?\\;version:\\1" }
}, },
"HubSpot": { "HubSpot": {
"website": "hubspot.com", "website": "hubspot.com",
@ -1632,7 +1628,7 @@
"IBM WebSphere Portal": { "IBM WebSphere Portal": {
"website": "ibm.com/software/websphere/portal", "website": "ibm.com/software/websphere/portal",
"cats": [ 1 ], "cats": [ 1 ],
"headers": { "IBM-Web2-Location": ".*", "Itx-Generated-Timestamp": ".+" }, "headers": { "IBM-Web2-Location": "", "Itx-Generated-Timestamp": "" },
"url": "/wps/", "url": "/wps/",
"implies": "Java" "implies": "Java"
}, },
@ -1645,7 +1641,7 @@
"iCongo": { "iCongo": {
"website": "hybris.com/icongo", "website": "hybris.com/icongo",
"cats": [ 6 ], "cats": [ 6 ],
"meta": { "iCongo": ".*" }, "meta": { "iCongo": "" },
"implies": "Adobe ColdFusion" "implies": "Adobe ColdFusion"
}, },
"IIS": { "IIS": {
@ -2203,14 +2199,14 @@
"cats": [ 1 ], "cats": [ 1 ],
"env": "^eidosBase$\\;confidence:99", "env": "^eidosBase$\\;confidence:99",
"html": "<!-- Methode uuid: \"[a-f\\d]+\" ?-->", "html": "<!-- Methode uuid: \"[a-f\\d]+\" ?-->",
"meta": { "eomportal-instanceid": "\\d+", "eomportal-id": "\\d+", "eomportal-loid": "[\\d.]+", "eomportal-uuid": "[a-f\\d]+", "eomportal-lastUpdate": ".*" } "meta": { "eomportal-instanceid": "\\d+", "eomportal-id": "\\d+", "eomportal-loid": "[\\d.]+", "eomportal-uuid": "[a-f\\d]+", "eomportal-lastUpdate": "" }
}, },
"Microsoft ASP.NET": { "Microsoft ASP.NET": {
"website": "www.asp.net", "website": "www.asp.net",
"cats": [ 18 ], "cats": [ 18 ],
"url": "\\.aspx(?:$|\\?)", "url": "\\.aspx(?:$|\\?)",
"html": "<input[^>]+name=\"__VIEWSTATE", "html": "<input[^>]+name=\"__VIEWSTATE",
"headers": { "X-Powered-By": "ASP\\.NET\\;confidence:50", "X-AspNet-Version": "(.+)\\;version:\\1", "Set-Cookie": "(ASPSESSION|ASP\\.NET_SessionId)" }, "headers": { "X-Powered-By": "ASP\\.NET\\;confidence:50", "X-AspNet-Version": "(.+)\\;version:\\1", "Set-Cookie": "ASPSESSION|ASP\\.NET_SessionId" },
"implies": "IIS\\;confidence:50" "implies": "IIS\\;confidence:50"
}, },
"Microsoft HTTPAPI": { "Microsoft HTTPAPI": {
@ -2222,7 +2218,7 @@
"website": "sharepoint.microsoft.com", "website": "sharepoint.microsoft.com",
"cats": [ 1 ], "cats": [ 1 ],
"meta": { "generator": "Microsoft SharePoint" }, "meta": { "generator": "Microsoft SharePoint" },
"headers": { "MicrosoftSharePointTeamServices": "(.*)\\;version:\\1", "X-SharePointHealthScore": ".*", "SPRequestGuid": ".*", "SharePointHealthScore": ".*" }, "headers": { "MicrosoftSharePointTeamServices": "(.*)\\;version:\\1", "X-SharePointHealthScore": "", "SPRequestGuid": "", "SharePointHealthScore": "" },
"env": "^_spBodyOnLoadCalled$" "env": "^_spBodyOnLoadCalled$"
}, },
"mini_httpd": { "mini_httpd": {
@ -2295,6 +2291,12 @@
"headers": { "Server": "mod_auth_pam(?:/([\\d\\.]+))?\\;version:\\1" }, "headers": { "Server": "mod_auth_pam(?:/([\\d\\.]+))?\\;version:\\1" },
"implies": "Apache" "implies": "Apache"
}, },
"mod_dav": {
"website": "webdav.org/mod_dav",
"cats": [ 33 ],
"headers": { "Server": "\\b(?:mod_)?DAV\\b(?:/([\\d.]+))?\\;version:\\1" },
"implies": "Apache"
},
"mod_fastcgi": { "mod_fastcgi": {
"website": "www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html", "website": "www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html",
"cats": [ 33 ], "cats": [ 33 ],
@ -2547,6 +2549,10 @@
"headers": { "Set-Cookie": "october_session=" }, "headers": { "Set-Cookie": "october_session=" },
"implies": "Laravel" "implies": "Laravel"
}, },
"OmniTouch 8660 My Teamwork": {
"website": "enterprise.alcatel-lucent.com",
"cats": [ 19 ]
},
"Open AdStream": { "Open AdStream": {
"website": "xaxis.com", "website": "xaxis.com",
"cats": [ 36 ], "cats": [ 36 ],
@ -2579,7 +2585,7 @@
"openEngine": { "openEngine": {
"website": "openengine.de/html/pages/de/", "website": "openengine.de/html/pages/de/",
"cats": [ 1 ], "cats": [ 1 ],
"meta": { "openEngine": ".*" } "meta": { "openEngine": "" }
}, },
"OpenGrok": { "OpenGrok": {
"website": "hub.opensolaris.org/bin/view/Project+opengrok/WebHome", "website": "hub.opensolaris.org/bin/view/Project+opengrok/WebHome",
@ -2644,8 +2650,7 @@
"Oracle HTTP Server": { "Oracle HTTP Server": {
"website": "oracle.com", "website": "oracle.com",
"cats": [ 22 ], "cats": [ 22 ],
"headers": { "Server": "Oracle-HTTP-Server(?:/([\\d.]+))?\\;version:\\1" }, "headers": { "Server": "Oracle-HTTP-Server(?:/([\\d.]+))?\\;version:\\1" }
"excludes": [ "HTTP-Server" ]
}, },
"Oracle Recommendations On Demand": { "Oracle Recommendations On Demand": {
"website": "www.oracle.com/us/products/applications/commerce/recommendations-on-demand/index.html", "website": "www.oracle.com/us/products/applications/commerce/recommendations-on-demand/index.html",
@ -2988,7 +2993,7 @@
"RackCache": { "RackCache": {
"website": "github.com/rtomayko/rack-cache", "website": "github.com/rtomayko/rack-cache",
"cats": [ 23 ], "cats": [ 23 ],
"headers": { "X-Rack-Cache": ".+" }, "headers": { "X-Rack-Cache": "" },
"implies": "Ruby" "implies": "Ruby"
}, },
"RAID HTTPServer": { "RAID HTTPServer": {
@ -3248,7 +3253,7 @@
"website": "simgroep.nl/internet/portfolio-contentbeheer_41623/", "website": "simgroep.nl/internet/portfolio-contentbeheer_41623/",
"cats": [ 1 ], "cats": [ 1 ],
"script": "/sim(?:site|core)/js", "script": "/sim(?:site|core)/js",
"meta": { "SIM.medium": ".*" } "meta": { "SIM.medium": "" }
}, },
"Site Meter": { "Site Meter": {
"website": "www.sitemeter.com", "website": "www.sitemeter.com",
@ -3366,14 +3371,14 @@
"Solodev": { "Solodev": {
"website": "www.solodev.com", "website": "www.solodev.com",
"cats": [ 1 ], "cats": [ 1 ],
"headers": { "solodev_session": ".*" }, "headers": { "solodev_session": "" },
"html": "<div class='dynamicDiv' id='dd\\.\\d\\.\\d'>", "html": "<div class='dynamicDiv' id='dd\\.\\d\\.\\d'>",
"implies": "PHP" "implies": "PHP"
}, },
"SPDY": { "SPDY": {
"website": "chromium.org/spdy", "website": "chromium.org/spdy",
"cats": [ 19 ], "cats": [ 19 ],
"headers": { "X-Firefox-Spdy": ".*" } "headers": { "X-Firefox-Spdy": "" }
}, },
"Sphinx": { "Sphinx": {
"website": "sphinx.pocoo.org", "website": "sphinx.pocoo.org",
@ -3396,7 +3401,7 @@
"website": "www.spip.net", "website": "www.spip.net",
"cats": [ 1 ], "cats": [ 1 ],
"meta": { "generator": "(?:^|\\s)SPIP(?:\\s([\\d.]+(?:\\s\\[\\d+\\])?))?\\;version:\\1" }, "meta": { "generator": "(?:^|\\s)SPIP(?:\\s([\\d.]+(?:\\s\\[\\d+\\])?))?\\;version:\\1" },
"headers": { "X-Spip-Cache": ".*" } "headers": { "X-Spip-Cache": "" }
}, },
"Spree": { "Spree": {
"website": "spreecommerce.com", "website": "spreecommerce.com",
@ -3510,7 +3515,7 @@
"cats": [ 18 ], "cats": [ 18 ],
"meta": { "generator": "Swiftlet" }, "meta": { "generator": "Swiftlet" },
"html": "Powered by <a href=\"[^>]+Swiftlet", "html": "Powered by <a href=\"[^>]+Swiftlet",
"headers": { "X-Swiftlet-Cache": ".*", "X-Powered-By": "Swiftlet", "X-Generator": "Swiftlet" }, "headers": { "X-Swiftlet-Cache": "", "X-Powered-By": "Swiftlet", "X-Generator": "Swiftlet" },
"implies": "PHP" "implies": "PHP"
}, },
"Synology DiskStation": { "Synology DiskStation": {
@ -3610,7 +3615,7 @@
"cats": [ 11 ], "cats": [ 11 ],
"html": "<iframe src=\"[^>]+tumblr\\.com", "html": "<iframe src=\"[^>]+tumblr\\.com",
"url": "^https?://(?:www\\.)?[^/]+\\.tumblr\\.com/", "url": "^https?://(?:www\\.)?[^/]+\\.tumblr\\.com/",
"headers": { "X-Tumblr-User": ".*" } "headers": { "X-Tumblr-User": "" }
}, },
"TweenMax": { "TweenMax": {
"website": "greensock.com/tweenmax", "website": "greensock.com/tweenmax",
@ -3762,7 +3767,7 @@
"Varnish": { "Varnish": {
"website": "www.varnish-cache.org", "website": "www.varnish-cache.org",
"cats": [ 23 ], "cats": [ 23 ],
"headers": { "X-Varnish": ".+", "X-Varnish-Age": ".+", "X-Varnish-Cache": ".+", "X-Varnish-Action": ".+", "X-Varnish-Hostname": ".+", "Via": "Varnish" } "headers": { "X-Varnish": "", "X-Varnish-Age": "", "X-Varnish-Cache": "", "X-Varnish-Action": "", "X-Varnish-Hostname": "", "Via": "Varnish" }
}, },
"vBulletin": { "vBulletin": {
"website": "www.vbulletin.com", "website": "www.vbulletin.com",
@ -3978,7 +3983,7 @@
"website": "wix.com", "website": "wix.com",
"cats": [ 1 ], "cats": [ 1 ],
"script": "static\\.wixstatic\\.com", "script": "static\\.wixstatic\\.com",
"headers": { "X-Wix-Dispatcher-Cache-Hit": ".+", "Set-Cookie": "Domain=\\.wix\\.com" }, "headers": { "X-Wix-Dispatcher-Cache-Hit": "", "Set-Cookie": "Domain=\\.wix\\.com" },
"env": "^wix(?:Events|Data|Errors)" "env": "^wix(?:Events|Data|Errors)"
}, },
"Wolf CMS": { "Wolf CMS": {

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB