diff --git a/scripts/artifacts/FacebookMessenger.py b/scripts/artifacts/FacebookMessenger.py index b1b22c58..d0ba84d6 100755 --- a/scripts/artifacts/FacebookMessenger.py +++ b/scripts/artifacts/FacebookMessenger.py @@ -248,7 +248,7 @@ def get_FacebookMessenger(files_found, report_folder, seeker, wrap_text): (select json_extract (messages.shares, '$[0].description')) as ShareDesc, (select json_extract (messages.shares, '$[0].href')) as ShareLink, message_reactions.reaction as "Message Reaction", - datetime(message_reactions.reaction_timestamp/1000,'unixepoch') as "Message Reaction Timestamp", + '' as "Message Reaction Timestamp", messages.msg_id from messages, threads left join message_reactions on message_reactions.msg_id = messages.msg_id diff --git a/scripts/artifacts/gmailEmails.py b/scripts/artifacts/gmailEmails.py index 019ad1a5..33358019 100644 --- a/scripts/artifacts/gmailEmails.py +++ b/scripts/artifacts/gmailEmails.py @@ -136,6 +136,7 @@ def gmailEmails(files_found, report_folder, seeker, wrap_text): else: subjectline = '' + messagehtml = '' messagetest = (message.get('6', '')) #HTML message if messagetest != '': messagetest = message['6'].get('2','') diff --git a/scripts/artifacts/googleMapsGmm.py b/scripts/artifacts/googleMapsGmm.py index 991cb3db..291369ed 100644 --- a/scripts/artifacts/googleMapsGmm.py +++ b/scripts/artifacts/googleMapsGmm.py @@ -85,18 +85,22 @@ def get_googleMapsGmm(files_found, report_folder, seeker, wrap_text): db = open_sqlite_db_readonly(file_found) file_found_myplaces = file_found cursor = db.cursor() - cursor.execute(''' - select - rowid, - key_string, - round(latitude*.000001,6), - round(longitude*.000001,6), - sync_item, - timestamp - from sync_item - ''') - all_rows = cursor.fetchall() - + + try: + cursor.execute(''' + select + rowid, + key_string, + round(latitude*.000001,6), + round(longitude*.000001,6), + sync_item, + timestamp + from sync_item + ''') + all_rows = cursor.fetchall() + except sqlite3.OperationalError: + all_rows = [] + for row in all_rows: id = row[0] keystring = row[1] diff --git a/scripts/artifacts/offlinePages.py b/scripts/artifacts/offlinePages.py index 8e20c906..1cdf46fc 100644 --- a/scripts/artifacts/offlinePages.py +++ b/scripts/artifacts/offlinePages.py @@ -24,7 +24,7 @@ def get_offlinePages(files_found, report_folder, seeker, wrap_text): file_found = str(file_found) modified_time = os.path.getmtime(file_found) - utc_modified_date = datetime.fromtimestamp(modified_time, tz=timezone.utc) + utc_modified_date = datetime.fromtimestamp(modified_time) timestamp = convert_utc_int_to_timezone(utc_modified_date, 'UTC') diff --git a/scripts/artifacts/wellbeing.py b/scripts/artifacts/wellbeing.py index a2cdfc0c..884564ad 100755 --- a/scripts/artifacts/wellbeing.py +++ b/scripts/artifacts/wellbeing.py @@ -63,25 +63,30 @@ def get_wellbeing(files_found, report_folder, seeker, wrap_text): data_list.append((event_ts, row[2], row[3], file_found)) cursor = db.cursor() - cursor.execute(''' - SELECT - datetime(component_events.timestamp/1000, "UNIXEPOCH") as timestamp, - component_events._id, - components.package_id, - packages.package_name, - components.component_name as website, - CASE - when component_events.type=1 THEN 'ACTIVITY_RESUMED' - when component_events.type=2 THEN 'ACTIVITY_PAUSED' - else component_events.type - END as eventType - FROM component_events - INNER JOIN components ON component_events.component_id=components._id - INNER JOIN packages ON components.package_id=packages._id - ORDER BY timestamp - ''') + try: + cursor.execute(''' + SELECT + datetime(component_events.timestamp/1000, "UNIXEPOCH") as timestamp, + component_events._id, + components.package_id, + packages.package_name, + components.component_name as website, + CASE + when component_events.type=1 THEN 'ACTIVITY_RESUMED' + when component_events.type=2 THEN 'ACTIVITY_PAUSED' + else component_events.type + END as eventType + FROM component_events + INNER JOIN components ON component_events.component_id=components._id + INNER JOIN packages ON components.package_id=packages._id + ORDER BY timestamp + ''') - all_rows = cursor.fetchall() + all_rows = cursor.fetchall() + + except: + all_rows = [] + usageentries = len(all_rows) if usageentries > 0: for row in all_rows: