fix: [virustotal_public] Resolve key error when user enrich hostname

- Same as #424
pull/429/head
chrisr3d 2020-09-28 12:34:00 +02:00
parent 38c3502394
commit c5abf89805
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ class VirusTotalParser():
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: