def _get_ssdeep(self):
"""
Generates the ssdeep fuzzy hash of the file.
@return: ssdeep fuzzy hash of the file
"""
if not IS_SSDEEP:
return None
try:
return ssdeep.ssdeep().hash_file(self.file_path)
except:
try:
import ssdeep
return ssdeep.hash_from_file(self.file_path)
except:
return None
return None
def _get_type(self):
"""
Retrieves the libmagic type of the file.
@return: file type
"""
if not IS_MAGIC:
return None
try:
ms = magic.open(magic.MAGIC_NONE)
ms.load()
return ms.buffer(self.file_data)
except:
try:
return magic.Magic().from_file(self.file_path)
except:
return None
return None
Cloudy with a Chance of Hackers: Protecting Critical Cloud Workloads
If you've been following along with David's posts, you'll have noticed a structure to the topics: Part I: The Plan, Part II: The Execution and now we move into Part III: Security Operations. Things...
Read MoreTrustwave Rapid Response: CrowdStrike Falcon Outage Update
Trustwave is proactively assessing and monitoring our clients who may have been impacted by CrowdStrike’s recently rolled-out update for its Windows users. The critical issue identified with...
Read MoreUsing AWS Secrets Manager and Lambda Function to Store, Rotate and Secure Keys
When working with Amazon Web Services (AWS), we often find that various AWS services need to store and manage secrets. AWS Secrets Manager is the go-to solution for this. It's a centralized service...
Read More