mirror of
https://github.com/mvt-project/mvt.git
synced 2024-07-01 08:29:03 +00:00
Compare commits
3 Commits
8e9fd0d763
...
e25d20e586
Author | SHA1 | Date | |
---|---|---|---|
|
e25d20e586 | ||
|
5d2ff32e3a | ||
|
2838bac63f |
|
@ -12,7 +12,7 @@ from .base import AndroidQFModule
|
||||||
|
|
||||||
|
|
||||||
class DumpsysAccessibility(DumpsysAccessibilityArtifact, AndroidQFModule):
|
class DumpsysAccessibility(DumpsysAccessibilityArtifact, AndroidQFModule):
|
||||||
"""This module analyse dumpsys accessbility"""
|
"""This module analyses dumpsys accessibility"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
|
|
@ -10,7 +10,7 @@ from .version import MVT_VERSION
|
||||||
|
|
||||||
|
|
||||||
def check_updates() -> None:
|
def check_updates() -> None:
|
||||||
# First we check for MVT version udpates.
|
# First we check for MVT version updates.
|
||||||
mvt_updates = MVTUpdates()
|
mvt_updates = MVTUpdates()
|
||||||
try:
|
try:
|
||||||
latest_version = mvt_updates.check()
|
latest_version = mvt_updates.check()
|
||||||
|
|
|
@ -44,7 +44,7 @@ class SMS(IOSExtraction):
|
||||||
def serialize(self, record: dict) -> Union[dict, list]:
|
def serialize(self, record: dict) -> Union[dict, list]:
|
||||||
text = record["text"].replace("\n", "\\n")
|
text = record["text"].replace("\n", "\\n")
|
||||||
sms_data = f"{record['service']}: {record['guid']} \"{text}\" from {record['phone_number']} ({record['account']})"
|
sms_data = f"{record['service']}: {record['guid']} \"{text}\" from {record['phone_number']} ({record['account']})"
|
||||||
sms_data = [
|
records = [
|
||||||
{
|
{
|
||||||
"timestamp": record["isodate"],
|
"timestamp": record["isodate"],
|
||||||
"module": self.__class__.__name__,
|
"module": self.__class__.__name__,
|
||||||
|
@ -54,7 +54,7 @@ class SMS(IOSExtraction):
|
||||||
]
|
]
|
||||||
# If the message was read, we add an extra event.
|
# If the message was read, we add an extra event.
|
||||||
if record["isodate_read"]:
|
if record["isodate_read"]:
|
||||||
sms_data.append(
|
records.append(
|
||||||
{
|
{
|
||||||
"timestamp": record["isodate_read"],
|
"timestamp": record["isodate_read"],
|
||||||
"module": self.__class__.__name__,
|
"module": self.__class__.__name__,
|
||||||
|
@ -62,7 +62,7 @@ class SMS(IOSExtraction):
|
||||||
"data": sms_data,
|
"data": sms_data,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
return sms_data
|
return records
|
||||||
|
|
||||||
def check_indicators(self) -> None:
|
def check_indicators(self) -> None:
|
||||||
for message in self.results:
|
for message in self.results:
|
||||||
|
|
Binary file not shown.
|
@ -17,7 +17,7 @@ class TestSMSModule:
|
||||||
m = SMS(target_path=get_ios_backup_folder())
|
m = SMS(target_path=get_ios_backup_folder())
|
||||||
run_module(m)
|
run_module(m)
|
||||||
assert len(m.results) == 1
|
assert len(m.results) == 1
|
||||||
assert len(m.timeline) == 1
|
assert len(m.timeline) == 2
|
||||||
assert len(m.detected) == 0
|
assert len(m.detected) == 0
|
||||||
|
|
||||||
def test_detection(self, indicator_file):
|
def test_detection(self, indicator_file):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user