From 26950ea7de576906ae4ab5ae38b3f1cf4874d23e Mon Sep 17 00:00:00 2001 From: Sebdraven Date: Tue, 10 Jul 2018 16:51:31 +0200 Subject: [PATCH] change loop --- misp_modules/modules/expansion/dnstrails.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/misp_modules/modules/expansion/dnstrails.py b/misp_modules/modules/expansion/dnstrails.py index b352bd7..f950500 100644 --- a/misp_modules/modules/expansion/dnstrails.py +++ b/misp_modules/modules/expansion/dnstrails.py @@ -277,15 +277,16 @@ def expand_history_ipv4(api, domain): if 'records' in results: for record in results['records']: if 'values' in record: - r.append( - {'type': ['domain|ip'], - 'values': ['%s|%s' % (domain, record['ip'])], - 'categories': ['Newtwork activity'], - 'comment': 'last seen: %s first seen: %s' % - (record['last_seen'], - record['first_seen']) - } - ) + for item in record['values']: + r.append( + {'type': ['domain|ip'], + 'values': ['%s|%s' % (domain, item['ip'])], + 'categories': ['Newtwork activity'], + 'comment': 'last seen: %s first seen: %s' % + (record['last_seen'], + record['first_seen']) + } + ) except APIError as e: misperrors['error'] = e