chg: [hashlookup] Using the actual attribute types for FileName & FileSize

- Following the recent changes on the obejct template
  to use `filename` as attribute type for the FileName
  object relation instead of `text`
  d2b93f5aa6
pull/520/head
chrisr3d 2021-08-26 15:19:36 +02:00
parent 1d7f0ee1f0
commit 82e0628fe7
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 2 additions and 2 deletions

View File

@ -33,8 +33,8 @@ class HashlookupParser():
hashlookup_object = MISPObject('hashlookup') hashlookup_object = MISPObject('hashlookup')
hashlookup_object.add_attribute('MD5', **{'type': 'md5', 'value': self.hashlookupresult['MD5']}) hashlookup_object.add_attribute('MD5', **{'type': 'md5', 'value': self.hashlookupresult['MD5']})
hashlookup_object.add_attribute('SHA-1', **{'type': 'sha1', 'value': self.hashlookupresult['SHA-1']}) hashlookup_object.add_attribute('SHA-1', **{'type': 'sha1', 'value': self.hashlookupresult['SHA-1']})
hashlookup_object.add_attribute('FileName', **{'type': 'text', 'value': self.hashlookupresult['FileName']}) hashlookup_object.add_attribute('FileName', **{'type': 'filename', 'value': self.hashlookupresult['FileName']})
hashlookup_object.add_attribute('FileSize', **{'type': 'text', 'value': self.hashlookupresult['FileSize']}) hashlookup_object.add_attribute('FileSize', **{'type': 'size-in-bytes', 'value': self.hashlookupresult['FileSize']})
hashlookup_object.add_reference(self.attribute['uuid'], 'related-to') hashlookup_object.add_reference(self.attribute['uuid'], 'related-to')
self.misp_event.add_object(hashlookup_object) self.misp_event.add_object(hashlookup_object)