From bd7f7fa1f3340921a7c451d25e640950f3de9a9d Mon Sep 17 00:00:00 2001 From: Jakub Onderka Date: Mon, 17 Aug 2020 17:34:21 +0200 Subject: [PATCH] fix: [virustotal] Resolve key error when user enrich hostname --- 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 b09de81..1e2c6c5 100644 --- a/misp_modules/modules/expansion/virustotal.py +++ b/misp_modules/modules/expansion/virustotal.py @@ -143,7 +143,7 @@ class VirusTotalParser(object): def parse_resolutions(self, resolutions, subdomains=None, uuids=None): domain_ip_object = MISPObject('domain-ip') - if self.attribute.type == 'domain': + if self.attribute.type in ('domain', 'hostname'): domain_ip_object.add_attribute('domain', type='domain', value=self.attribute.value) attribute_type, relation, key = ('ip-dst', 'ip', 'ip_address') else: