From f377f795212166f780c1a44714a401770246e6c6 Mon Sep 17 00:00:00 2001 From: Guido Iaquinti Date: Sun, 12 Jun 2016 12:22:29 +0100 Subject: [PATCH] Handle DNSdumpster null results --- sublist3r.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sublist3r.py b/sublist3r.py index e718354..0214aa3 100644 --- a/sublist3r.py +++ b/sublist3r.py @@ -590,7 +590,7 @@ class DNSdumpster(multiprocessing.Process): return response.text else: return response.content - + def get_csrftoken(self, resp): csrf_regex = re.compile("",re.S) token = csrf_regex.findall(resp)[0] @@ -608,7 +608,10 @@ class DNSdumpster(multiprocessing.Process): tbl_regex = re.compile('<\/a>Host Records.*?(.*?)',re.S) link_regex = re.compile('(.*?)
',re.S) links = [] - results_tbl = tbl_regex.findall(resp)[0] + try: + results_tbl = tbl_regex.findall(resp)[0] + except IndexError: + results_tbl = '' links_list = link_regex.findall(results_tbl) links = list(set(links_list)) for link in links: