Skip to content

Commit

Permalink
Updated to latest Wappalyzer and fixed issues with apps that depend o…
Browse files Browse the repository at this point in the history
…n other apps
  • Loading branch information
pmeenan committed Oct 19, 2021
1 parent 531f135 commit ccb502a
Show file tree
Hide file tree
Showing 34 changed files with 32,671 additions and 27,860 deletions.
15 changes: 10 additions & 5 deletions internal/devtools_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -990,10 +990,14 @@ def wappalyzer_script(self, response_headers, cookies):
with open(os.path.join(self.support_path, 'Wappalyzer', 'wappalyzer.js')) as f_in:
wappalyzer = f_in.read()
if wappalyzer is not None:
json_data = None
with open(os.path.join(self.support_path, 'Wappalyzer', 'technologies.json')) as f_in:
json_data = f_in.read()
if json is not None:
technologies = {}
categories = {}
with io.open(os.path.join(self.support_path, 'Wappalyzer', 'categories.json'), 'r', encoding='utf-8') as f_in:
categories = json.load(f_in)
for filename in sorted(glob.glob(os.path.join(self.support_path, 'Wappalyzer', 'technologies', '*.json'))):
with io.open(filename, 'r', encoding='utf-8') as f_in:
technologies.update(json.load(f_in))
if technologies and categories:
# Format the headers as a dictionary of lists
headers = {}
if response_headers is not None:
Expand All @@ -1019,9 +1023,10 @@ def wappalyzer_script(self, response_headers, cookies):
headers[key] = []
headers[key].append(value)
script = script.replace('%WAPPALYZER%', wappalyzer)
script = script.replace('%JSON%', json_data)
script = script.replace('%COOKIES%', json.dumps(cookies))
script = script.replace('%RESPONSE_HEADERS%', json.dumps(headers))
script = script.replace('%CATEGORIES%', json.dumps(categories))
script = script.replace('%TECHNOLOGIES%', json.dumps(technologies))
except Exception:
logging.exception('Error building wappalyzer script')
return script
Expand Down
Loading

0 comments on commit ccb502a

Please sign in to comment.