From 43a49dafc6d993b7a9142e7f16993eb209c5038a Mon Sep 17 00:00:00 2001 From: Sebdraven Date: Wed, 11 Jul 2018 09:48:14 +0200 Subject: [PATCH] add history dns and handler exception --- misp_modules/modules/expansion/dnstrails.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/misp_modules/modules/expansion/dnstrails.py b/misp_modules/modules/expansion/dnstrails.py index 24e252b..89e45ec 100644 --- a/misp_modules/modules/expansion/dnstrails.py +++ b/misp_modules/modules/expansion/dnstrails.py @@ -77,7 +77,7 @@ def handle_domain(api, domain, misperrors): if status_ok: result_filtered['results'].extend(r) else: - misperrors['error'] = 'Error dns result' + misperrors['error'] = misperrors['error'] + ' Error DNS result' return misperrors time.sleep(1) @@ -86,7 +86,7 @@ def handle_domain(api, domain, misperrors): if status_ok: result_filtered['results'].extend(r) else: - misperrors['error'] = 'Error subdomains result' + misperrors['error'] = misperrors['error'] + ' Error subdomains result' return misperrors time.sleep(1) @@ -95,7 +95,7 @@ def handle_domain(api, domain, misperrors): if status_ok: result_filtered['results'].extend(r) else: - misperrors['error'] = 'Error whois result' + misperrors['error'] = misperrors['error'] + ' Error whois result' return misperrors time.sleep(1) @@ -104,9 +104,18 @@ def handle_domain(api, domain, misperrors): if status_ok: result_filtered['results'].extend(r) else: - misperrors['error'] = 'Error history ipv4' + misperrors['error'] = misperrors['error'] + ' Error history ipv4' return misperrors + time.sleep(1) + r, status_ok = expand_history_dns(api, domain) + + if status_ok: + result_filtered['results'].extend(r) + else: + misperrors['error'] = misperrors[ + 'error'] + ' Error in expand History DNS' + return misperrors return result_filtered