MISP / MISP-STIX-Converter

A utility repo to assist with converting between MISP and STIX formats
GNU Lesser General Public License v3.0
64 stars 31 forks source link

Fix for "buildFileAttribute" - Hashes has no len() #26

Closed davidonzo closed 6 years ago

davidonzo commented 6 years ago

Using the latest OVA image, hashes import from stix file return the following error

object of type 'HexBinary' has no len()
object of type 'HexBinary' has no len()
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/misp_stix_converter/converters/buildMISPAttribute.py", line 313, in buildAttribute
    buildFileAttribute(obj, mispEvent, pkg, True)
  File "/usr/local/lib/python3.5/dist-packages/misp_stix_converter/converters/buildMISPAttribute.py", line 111, in buildFileAttribute
    if len(obj.md5) == 32:
TypeError: object of type 'HexBinary' has no len()

Should be fixed.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.6%) to 47.376% when pulling c223b817d4cb426dde80afd72de8dbdb2aafd2b5 on davidonzo:master into 8bb6f288aacc457443921d7b3da4924f46da99f8 on MISP:master.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.6%) to 47.376% when pulling c223b817d4cb426dde80afd72de8dbdb2aafd2b5 on davidonzo:master into 8bb6f288aacc457443921d7b3da4924f46da99f8 on MISP:master.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.6%) to 47.376% when pulling c223b817d4cb426dde80afd72de8dbdb2aafd2b5 on davidonzo:master into 8bb6f288aacc457443921d7b3da4924f46da99f8 on MISP:master.

FloatingGhost commented 6 years ago

Huh, seems the pre-merge works sometimes works and sometimes doesn't.

Such is STIX.

I think I'll merge here and revert once I merge a __len__ fix upstream

Thanks

davidonzo commented 6 years ago

Thanks to you!