Skip to content

Commit

Permalink
fix error with downloading xlsx file
Browse files Browse the repository at this point in the history
  • Loading branch information
tensts committed Aug 10, 2020
1 parent 5b8c820 commit fbaad42
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dnsdumpster/DNSDumpsterAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fbaad42

Please sign in to comment.