mirror of
https://github.com/mvt-project/mvt.git
synced 2024-06-29 07:39:00 +00:00
Minor style fixes
This commit is contained in:
parent
7222bc82e1
commit
298726ab2b
|
@ -32,13 +32,14 @@ class Applications(IOSUSBExtraction):
|
|||
|
||||
def run(self) -> None:
|
||||
user_apps = InstallationProxyService(lockdown=self.lockdown).get_apps("User")
|
||||
for u in user_apps:
|
||||
u["type"] = "user"
|
||||
for user_app in user_apps:
|
||||
user_app["type"] = "user"
|
||||
|
||||
system_apps = InstallationProxyService(lockdown=self.lockdown).get_apps("System")
|
||||
for s in system_apps:
|
||||
s["type"] = "system"
|
||||
for system_app in system_apps:
|
||||
system_app["type"] = "system"
|
||||
|
||||
self.results = user_apps + system_apps
|
||||
|
||||
self.log.info("{} applications identified on the phone".format(len(self.results)))
|
||||
self.log.info("%d applications identified on the phone",
|
||||
len(self.results))
|
||||
|
|
|
@ -23,7 +23,6 @@ class DeviceInfo(IOSUSBExtraction):
|
|||
def run(self) -> None:
|
||||
self.results = self.lockdown.all_values
|
||||
|
||||
# Base64 encoding of bytes
|
||||
for entry in self.results:
|
||||
if isinstance(self.results[entry], bytes):
|
||||
self.results[entry] = base64.b64encode(self.results[entry])
|
||||
|
|
|
@ -12,6 +12,7 @@ from .base import IOSUSBExtraction
|
|||
|
||||
class Processes(IOSUSBExtraction):
|
||||
"""This class extracts all processes running on the phone."""
|
||||
|
||||
def __init__(self, file_path: str = None, target_path: str = None,
|
||||
results_path: str = None, fast_mode: bool = False,
|
||||
log: logging.Logger = None, results: list = []) -> None:
|
||||
|
@ -31,10 +32,11 @@ class Processes(IOSUSBExtraction):
|
|||
|
||||
def run(self) -> None:
|
||||
processes = OsTraceService(lockdown=self.lockdown).get_pid_list().get('Payload')
|
||||
for p in processes:
|
||||
for pid in processes:
|
||||
self.results.append({
|
||||
"pid": p,
|
||||
"name": processes[p]["ProcessName"]
|
||||
"pid": pid,
|
||||
"name": processes[pid]["ProcessName"]
|
||||
})
|
||||
|
||||
self.log.info("{} running processes identified on the phone".format(len(self.results)))
|
||||
self.log.info("%d running processes identified on the phone",
|
||||
len(self.results))
|
||||
|
|
Loading…
Reference in New Issue
Block a user