diff --git a/Wappalyzer.py b/Wappalyzer.py index 80526b8..f0e70a0 100644 --- a/Wappalyzer.py +++ b/Wappalyzer.py @@ -65,7 +65,7 @@ def _parse_html(self): } @classmethod - def new_from_url(cls, url, verify=True): + def new_from_url(cls, url, verify=True, custom_headers=None): """ Constructs a new WebPage object for the URL, using the `requests` module to fetch the HTML. @@ -75,8 +75,11 @@ def new_from_url(cls, url, verify=True): url : str verify: bool + custom_headers: dict + Dictionary that allow send custom headers on request """ - response = requests.get(url, verify=verify, timeout=2.5) + response = requests.get( + url, headers=custom_headers, verify=verify, timeout=2.5) return cls.new_from_response(response) @classmethod diff --git a/bin/update_apps.py b/bin/update_apps.py new file mode 100644 index 0000000..c7f0a3a --- /dev/null +++ b/bin/update_apps.py @@ -0,0 +1,11 @@ +import requests + +print('Beginning file apps.json download') + +url = 'https://raw.githubusercontent.com/AliasIO/Wappalyzer/master/src/apps.json' +r = requests.get(url) + +with open('../data/apps.json', 'wb') as f: + f.write(r.content) + +print('File apps.json updated with success!') \ No newline at end of file