From cda5feedaadc4f06eb7a4c83347ee504feef29e8 Mon Sep 17 00:00:00 2001 From: Jakub Onderka Date: Wed, 1 Jul 2020 16:13:40 +0200 Subject: [PATCH] fix: [virustotal] Subdomains is optional in VT response --- misp_modules/modules/expansion/virustotal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misp_modules/modules/expansion/virustotal.py b/misp_modules/modules/expansion/virustotal.py index f47a2e3..b09de81 100644 --- a/misp_modules/modules/expansion/virustotal.py +++ b/misp_modules/modules/expansion/virustotal.py @@ -52,7 +52,7 @@ class VirusTotalParser(object): 'downloaded': 'downloaded-from', 'referrer': 'referring'} siblings = (self.parse_siblings(domain) for domain in req['domain_siblings']) - uuid = self.parse_resolutions(req['resolutions'], req['subdomains'], siblings) + uuid = self.parse_resolutions(req['resolutions'], req['subdomains'] if 'subdomains' in req else None, siblings) for feature_type, relationship in feature_types.items(): for feature in ('undetected_{}_samples', 'detected_{}_samples'): for sample in req.get(feature.format(feature_type), [])[:self.limit]: