Move guard to a more specific place

This commit is contained in:
Rory Flynn 2024-01-31 11:00:58 +01:00 committed by GitHub
parent b22e75e88b
commit 74c1f274f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -54,12 +54,9 @@ class SMSAttachments(IOSExtraction):
} }
def check_indicators(self) -> None: def check_indicators(self) -> None:
if not self.indicators:
return
for attachment in self.results: for attachment in self.results:
# Check for known malicious filenames. # Check for known malicious filenames.
if self.indicators.check_file_path(attachment["filename"]): if self.indicators and self.indicators.check_file_path(attachment["filename"]):
self.detected.append(attachment) self.detected.append(attachment)
if ( if (