From 6c0b93f01b5a326a179322c863b4bd4970e04cdb Mon Sep 17 00:00:00 2001 From: Felipe Tomaz Date: Tue, 8 Oct 2019 06:07:44 -0300 Subject: [PATCH 1/3] Adding script to update apps.json based on AliasIO/Wappalyzer repository --- bin/update_apps.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 bin/update_apps.py 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 From 153c46ec04ab72bf731bf93651b5171f7ccbde09 Mon Sep 17 00:00:00 2001 From: Felipe Tomaz Date: Tue, 8 Oct 2019 06:34:35 -0300 Subject: [PATCH 2/3] Adding custom_headers to new_from_url metbod --- Wappalyzer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Wappalyzer.py b/Wappalyzer.py index 80526b8..bc80377 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. @@ -76,7 +76,8 @@ def new_from_url(cls, url, verify=True): url : str verify: bool """ - 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 From e7e5468a2155b8d93661f1aec03ec1eae7554cc8 Mon Sep 17 00:00:00 2001 From: Felipe Tomaz Date: Tue, 8 Oct 2019 06:38:38 -0300 Subject: [PATCH 3/3] Update method docstring --- Wappalyzer.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Wappalyzer.py b/Wappalyzer.py index bc80377..f0e70a0 100644 --- a/Wappalyzer.py +++ b/Wappalyzer.py @@ -75,6 +75,8 @@ def new_from_url(cls, url, verify=True, custom_headers=None): url : str verify: bool + custom_headers: dict + Dictionary that allow send custom headers on request """ response = requests.get( url, headers=custom_headers, verify=verify, timeout=2.5)