diff --git a/drivers/firefox/install.rdf b/drivers/firefox/install.rdf index 63e9649f9..64f705e29 100644 --- a/drivers/firefox/install.rdf +++ b/drivers/firefox/install.rdf @@ -16,6 +16,15 @@ + + + + {92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} + 2.0 + 3.* + + + chrome://wappalyzer/content/xul/preferences.xul 3 diff --git a/drivers/python/wappalyzer.py b/drivers/python/wappalyzer.py new file mode 100755 index 000000000..15d048be8 --- /dev/null +++ b/drivers/python/wappalyzer.py @@ -0,0 +1,53 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import os +import sys +import PyV8 +import urllib +from urlparse import urlparse + +try: + import json +except ImportError: + import simplejson as json + + +class Wappalyzer(object): + + def __init__(self, url): + self.file_dir = os.path.dirname(__file__) + + f = open(os.path.join(self.file_dir, '../../share/apps.json')) + data = json.loads(f.read()) + f.close() + + self.categories = data['categories'] + self.apps = data['apps'] + self.url = url + + def analyze(self): + ctxt = PyV8.JSContext() + ctxt.enter() + + f1 = open(os.path.join(self.file_dir, '../php/js/wappalyzer.js')) + f2 = open(os.path.join(self.file_dir, '../php/js/driver.js')) + ctxt.eval(f1.read()) + ctxt.eval(f2.read()) + f1.close() + f2.close() + + host = urlparse(self.url).hostname + html = urllib.urlopen(self.url).read() + + data = {'host': host, 'url': self.url, 'html': html, 'headers': {}} + apps = json.dumps(self.apps) + categories = json.dumps(self.categories) + return ctxt.eval("w.apps = %s; w.categories = %s; w.driver.data = %s; w.driver.init();" % (apps, categories, json.dumps(data))) + +if __name__ == '__main__': + try: + w = Wappalyzer(sys.argv[1]) + print w.analyze() + except IndexError: + print ('Usage: python %s ' % sys.argv[0]) diff --git a/share/apps.json b/share/apps.json index b71fe4cf2..8e412d872 100644 --- a/share/apps.json +++ b/share/apps.json @@ -405,7 +405,7 @@ "website": "codemirror.net", "cats": [ 19 ], "env": "^CodeMirror$" - }, + }, "Commerce Server": { "website": "commerceserver.net", "cats": [ 6 ], @@ -682,7 +682,8 @@ "EdgeCast": { "website": "www.edgecast.com", "cats": [ 31 ], - "headers": { "Server": "^ECS" } + "headers": { "Server": "^EC(?:S|Acc)" }, + "url": "https?://(?:[^/]+\\.)?edgecastcdn\\.net/" }, "Eloqua": { "website": "eloqua.com", @@ -1485,7 +1486,7 @@ }, "MongoDB": { "website": "www.mongodb.org", - "cats": [ 24 ] + "cats": [ 34 ] }, "Mono": { "website": "mono-project.com", @@ -2650,6 +2651,11 @@ "website": "foundation.zurb.com", "cats": [ 18 ], "html": "]+foundation[^>\"]+css" + }, + "LiveStreet CMS": { + "website": "livestreetcms.com", + "cats": [ 1 ], + "headers": { "X-Powered-By": "LiveStreet CMS" } } } } diff --git a/share/images/icons/LiveStreet CMS.png b/share/images/icons/LiveStreet CMS.png new file mode 100644 index 000000000..75a0029aa Binary files /dev/null and b/share/images/icons/LiveStreet CMS.png differ