From fbaad42d17a764092f7f545fe524ba49c11dd6d2 Mon Sep 17 00:00:00 2001 From: tensts Date: Mon, 10 Aug 2020 05:00:10 -0400 Subject: [PATCH] fix error with downloading xlsx file --- dnsdumpster/DNSDumpsterAPI.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dnsdumpster/DNSDumpsterAPI.py b/dnsdumpster/DNSDumpsterAPI.py index 4667be6..7d83205 100644 --- a/dnsdumpster/DNSDumpsterAPI.py +++ b/dnsdumpster/DNSDumpsterAPI.py @@ -112,8 +112,9 @@ def search(self, domain): # XLS hosts. # eg. tsebo.com-201606131255.xlsx try: - pattern = r'https://dnsdumpster.com/static/xls/' + domain + '-[0-9]{12}\.xlsx' + pattern = r'/static/xls/' + domain + '-[0-9]{12}\.xlsx' xls_url = re.findall(pattern, req.content.decode('utf-8'))[0] + xls_url = 'https://dnsdumpster.com' + xls_url xls_data = base64.b64encode(self.session.get(xls_url).content) except Exception as err: print(err)