From 327a1ac893d72adb0e2078587ac3c674bdce1621 Mon Sep 17 00:00:00 2001 From: chrisr3d Date: Tue, 30 Mar 2021 03:42:54 +0200 Subject: [PATCH] fix: [farsight_passivedns] Fixed lookup_rdata_name results desclaration - Getting generator as a list as it is already the case for all the other results, so it avoids issues to read the results by accidently looping through the generator before it is actually needed, which would lose the content of the generator - Also removed print that was accidently introduced with the last commit --- misp_modules/modules/expansion/farsight_passivedns.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/misp_modules/modules/expansion/farsight_passivedns.py b/misp_modules/modules/expansion/farsight_passivedns.py index 8cdd8b6..6fc5f27 100755 --- a/misp_modules/modules/expansion/farsight_passivedns.py +++ b/misp_modules/modules/expansion/farsight_passivedns.py @@ -161,7 +161,6 @@ def parse_input(attribute, config): lookup_args['time_first_after'] = parse_timestamp(attribute['first_seen']) if attribute.get('last_seen'): lookup_args['time_last_before'] = parse_timestamp(attribute['last_seen']) - print(lookup_args) attribute_type = attribute['type'] if attribute_type in flex_query_input: return flex_queries, (lookup_args, attribute['value']) @@ -202,7 +201,7 @@ def lookup_name(client, lookup_args, name, flex): if rrset_response: response['rrset'] = rrset_response # RDATA = entries on the right-hand side of the domain name related labels - rdata_response = client.lookup_rdata_name(name, **lookup_args) + rdata_response = list(client.lookup_rdata_name(name, **lookup_args)) if rdata_response: response['rdata'] = rdata_response if flex: