Merge branch 'master' of github.com:ElbertF/Wappalyzer

main
Elbert Alias 12 years ago
commit 2e52eb2afe

@ -16,6 +16,15 @@
</Description>
</em:targetApplication>
<em:targetApplication>
<!-- Seamonkey -->
<Description>
<em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id>
<em:minVersion>2.0</em:minVersion>
<em:maxVersion>3.*</em:maxVersion>
</Description>
</em:targetApplication>
<em:optionsURL>chrome://wappalyzer/content/xul/preferences.xul</em:optionsURL>
<em:optionsType>3</em:optionsType>

@ -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 <url>' % sys.argv[0])

@ -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": "<link[^>]+foundation[^>\"]+css"
},
"LiveStreet CMS": {
"website": "livestreetcms.com",
"cats": [ 1 ],
"headers": { "X-Powered-By": "LiveStreet CMS" }
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 956 B