Minor changes for consistency

This commit is contained in:
Nex
2021-09-14 14:29:04 +02:00
parent 93936976c7
commit 032b229eb8
2 changed files with 8 additions and 8 deletions

View File

@@ -51,8 +51,8 @@ class IDStatusCache(IOSExtraction):
result.get("user"))
self.detected.append(result)
def extract_idstatuscache_entries(self):
with open(self.file_path, "rb") as handle:
def _extract_idstatuscache_entries(self, file_path):
with open(file_path, "rb") as handle:
file_plist = plistlib.load(handle)
id_status_cache_entries = []
@@ -85,11 +85,11 @@ class IDStatusCache(IOSExtraction):
if self.is_backup:
self._find_ios_database(backup_ids=IDSTATUSCACHE_BACKUP_IDS)
self.log.info("Found IDStatusCache plist at path: %s", self.file_path)
self.extract_idstatuscache_entries()
self._extract_idstatuscache_entries(self.file_path)
elif self.is_fs_dump:
for idstatuscache_path in self._get_fs_files_from_patterns(IDSTATUSCACHE_ROOT_PATHS):
self.file_path = idstatuscache_path
self.log.info("Found IDStatusCache plist at path: %s", self.file_path)
self.extract_idstatuscache_entries()
self._extract_idstatuscache_entries(self.file_path)
self.log.info("Extracted a total of %d ID Status Cache entries", len(self.results))

View File

@@ -59,8 +59,8 @@ class LocationdClients(IOSExtraction):
if self.indicators.check_process(proc_name):
self.detected.append(result)
def extract_locationd_entries(self):
with open(self.file_path, "rb") as handle:
def _extract_locationd_entries(self, file_path):
with open(file_path, "rb") as handle:
file_plist = plistlib.load(handle)
for key, values in file_plist.items():
@@ -77,11 +77,11 @@ class LocationdClients(IOSExtraction):
if self.is_backup:
self._find_ios_database(backup_ids=LOCATIOND_BACKUP_IDS)
self.log.info("Found Locationd Clients plist at path: %s", self.file_path)
self.extract_locationd_entries()
self._extract_locationd_entries(self.file_path)
elif self.is_fs_dump:
for locationd_path in self._get_fs_files_from_patterns(LOCATIOND_ROOT_PATHS):
self.file_path = locationd_path
self.log.info("Found Locationd Clients plist at path: %s", self.file_path)
self.extract_locationd_entries()
self._extract_locationd_entries(self.file_path)
self.log.info("Extracted a total of %d Locationd Clients entries", len(self.results))