Update mispevent.py

pull/665/head
Raphaël Vinot 2020-11-28 02:06:48 +01:00 committed by GitHub
parent fe91e10ced
commit 201eeeb729
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -309,7 +309,10 @@ class MISPAttribute(AbstractMISP):
@property
def malware_binary(self) -> Optional[BytesIO]:
"""Returns a BytesIO of the malware (if the attribute has one, obvs)."""
"""Returns a BytesIO of the malware (if the attribute has one, obvs).
Note: The first call may be slow as it will decrypt the sample and this
operation can be very slow, especially if the malware sample is big (~1s/MB).
"""
if self.type != 'malware-sample':
# Not a malware sample
return None