Renaming check function for consistency

This commit is contained in:
Nex 2022-01-12 16:02:13 +01:00
parent 11bc916854
commit 146f2ae57d
3 changed files with 4 additions and 3 deletions

View File

@ -89,7 +89,7 @@ class Files(AndroidExtraction):
return
for result in self.results:
if self.indicators.check_filename(result["path"]):
if self.indicators.check_file_name(result["path"]):
self.log.warning("Found a known suspicous filename at path: \"%s\"", result["path"])
self.detected.append(result)

View File

@ -271,7 +271,7 @@ class Indicators:
return False
def check_filename(self, file_path) -> bool:
def check_file_name(self, file_path) -> bool:
"""Check the provided file path against the list of file indicators.
:param file_path: File path or file name to check against file
@ -307,6 +307,7 @@ class Indicators:
# Strip any trailing slash from indicator paths to match directories.
if file_path.startswith(ioc_file.rstrip("/")):
return True
return False
def check_profile(self, profile_uuid) -> bool:

View File

@ -83,7 +83,7 @@ class Manifest(IOSExtraction):
self.detected.append(result)
continue
if self.indicators.check_filename(result["relative_path"]):
if self.indicators.check_file_name(result["relative_path"]):
self.log.warning("Found a known malicious file at path: %s", result["relative_path"])
self.detected.append(result)
continue