From be627acd1977e1d978b08306a8b9c2716080d3a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C3=B3n=20Vila?= Date: Wed, 23 Oct 2019 00:50:10 +0200 Subject: [PATCH 1/2] Fix for regex at dnsdumper The issue was being cause by a never-catcheable regex. dnsdumpster HTML attributes use double quotes whereas this regex was catching only the expression with simple ones and thus creating an empty regex object (None Type). --- plugins/dnsdumpster.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/dnsdumpster.py b/plugins/dnsdumpster.py index f0b2473..05dd63d 100644 --- a/plugins/dnsdumpster.py +++ b/plugins/dnsdumpster.py @@ -8,7 +8,7 @@ def dnsdumpster(domain, output_dir): """Query dnsdumpster.com.""" response = requests.Session().get('https://dnsdumpster.com/').text csrf_token = re.search( - r"name='csrfmiddlewaretoken' value='(.*?)'", response).group(1) + r'name="csrfmiddlewaretoken" value="(.*?)", response).group(1) cookies = {'csrftoken': csrf_token} headers = {'Referer': 'https://dnsdumpster.com/'} From b81100b85dd08361b1f299f345c4b80381d1a6b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C3=B3n=20Vila?= <42870707+rmon-vfer@users.noreply.github.com> Date: Wed, 23 Oct 2019 15:50:32 +0200 Subject: [PATCH 2/2] Fix typo in regex --- plugins/dnsdumpster.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/dnsdumpster.py b/plugins/dnsdumpster.py index 05dd63d..a27ffab 100644 --- a/plugins/dnsdumpster.py +++ b/plugins/dnsdumpster.py @@ -8,7 +8,7 @@ def dnsdumpster(domain, output_dir): """Query dnsdumpster.com.""" response = requests.Session().get('https://dnsdumpster.com/').text csrf_token = re.search( - r'name="csrfmiddlewaretoken" value="(.*?)", response).group(1) + r'name="csrfmiddlewaretoken" value="(.*?)"', response).group(1) cookies = {'csrftoken': csrf_token} headers = {'Referer': 'https://dnsdumpster.com/'}