From d3dc011fa0f8a28a2326cabbcf8aa7982998b7b3 Mon Sep 17 00:00:00 2001 From: Rory Flynn Date: Wed, 3 Jan 2024 18:33:13 +0100 Subject: [PATCH] Circular reference in SMS module serialization --- mvt/ios/modules/mixed/sms.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mvt/ios/modules/mixed/sms.py b/mvt/ios/modules/mixed/sms.py index eecc1c4..6491343 100644 --- a/mvt/ios/modules/mixed/sms.py +++ b/mvt/ios/modules/mixed/sms.py @@ -44,7 +44,7 @@ class SMS(IOSExtraction): def serialize(self, record: dict) -> Union[dict, list]: text = record["text"].replace("\n", "\\n") sms_data = f"{record['service']}: {record['guid']} \"{text}\" from {record['phone_number']} ({record['account']})" - sms_data = [ + records = [ { "timestamp": record["isodate"], "module": self.__class__.__name__, @@ -54,7 +54,7 @@ class SMS(IOSExtraction): ] # If the message was read, we add an extra event. if record["isodate_read"]: - sms_data.append( + records.append( { "timestamp": record["isodate_read"], "module": self.__class__.__name__, @@ -62,7 +62,7 @@ class SMS(IOSExtraction): "data": sms_data, } ) - return sms_data + return records def check_indicators(self) -> None: for message in self.results: