From 234fa7323667b61fdccba86a7bbc642fa24784af Mon Sep 17 00:00:00 2001 From: Fabian Nunes Date: Mon, 27 Mar 2023 13:12:50 +0100 Subject: [PATCH 1/3] Fixed Bug where macOS would confuse it self between the sqlite file and the journal file --- scripts/artifacts/AdidasUser.py | 2 +- scripts/artifacts/MMWActivities.py | 2 +- scripts/artifacts/NikeAMoments.py | 4 ++-- scripts/artifacts/NikeActivities.py | 4 ++-- scripts/artifacts/NikeNotifications.py | 4 ++-- scripts/artifacts/NikePolyline.py | 4 ++-- scripts/artifacts/RunkeeperActivities.py | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/artifacts/AdidasUser.py b/scripts/artifacts/AdidasUser.py index 4219e050..79be3e0d 100644 --- a/scripts/artifacts/AdidasUser.py +++ b/scripts/artifacts/AdidasUser.py @@ -95,6 +95,6 @@ def get_adidas_user(files_found, report_folder, seeker, wrap_text): __artifacts__ = { "AdidasUser": ( "Adidas-Running", - ('*com.runtastic.android/databases/user.db*'), + ('*com.runtastic.android/databases/user.db'), get_adidas_user) } diff --git a/scripts/artifacts/MMWActivities.py b/scripts/artifacts/MMWActivities.py index 8cdc1aa1..203c3747 100644 --- a/scripts/artifacts/MMWActivities.py +++ b/scripts/artifacts/MMWActivities.py @@ -211,6 +211,6 @@ def get_map_activities(files_found, report_folder, seeker, wrap_text): __artifacts__ = { "MapWalkActivities": ( "Map-My-Walk", - ('*com.mapmywalk.android2/databases/workout.db*'), + ('*com.mapmywalk.android2/databases/workout.db'), get_map_activities) } diff --git a/scripts/artifacts/NikeAMoments.py b/scripts/artifacts/NikeAMoments.py index e7ac9d9a..2665e573 100644 --- a/scripts/artifacts/NikeAMoments.py +++ b/scripts/artifacts/NikeAMoments.py @@ -26,8 +26,8 @@ def get_nike_activMoments(files_found, report_folder, seeker, wrap_text): usageentries = len(all_rows) if usageentries > 0: logfunc(f"Found {usageentries} Nike Activities") - report = ArtifactHtmlReport('Activity Moments') - report.start_artifact_report(report_folder, 'Activity Moments') + report = ArtifactHtmlReport('Nike - Activity Moments') + report.start_artifact_report(report_folder, 'Nike - Activity Moments') report.add_script() data_headers = ('Activity ID', 'Start Time UTC', 'End Time UTC', 'Duration', 'Timeline') data_list = [] diff --git a/scripts/artifacts/NikeActivities.py b/scripts/artifacts/NikeActivities.py index f4554f1a..7ad6d9e0 100644 --- a/scripts/artifacts/NikeActivities.py +++ b/scripts/artifacts/NikeActivities.py @@ -26,8 +26,8 @@ def get_nike_activities(files_found, report_folder, seeker, wrap_text): usageentries = len(all_rows) if usageentries > 0: logfunc(f"Found {usageentries} Nike Activities") - report = ArtifactHtmlReport('Activities') - report.start_artifact_report(report_folder, 'Activities') + report = ArtifactHtmlReport('Nike - Activities') + report.start_artifact_report(report_folder, 'Nike - Activities') report.add_script() data_headers = ('Activity ID', 'Name', 'Start Time UTC', 'End Time UTC', 'Location', 'Source', 'Version', 'Temperature', 'Weather', 'Duration', 'Calories', 'Max Speed', 'Mean Speed', 'Steps', 'Distance', 'Pace', 'Cadence') data_list = [] diff --git a/scripts/artifacts/NikeNotifications.py b/scripts/artifacts/NikeNotifications.py index 14efcc03..8a15a2d3 100644 --- a/scripts/artifacts/NikeNotifications.py +++ b/scripts/artifacts/NikeNotifications.py @@ -9,7 +9,7 @@ def get_nike_notifications(files_found, report_folder, seeker, wrap_text): - logfunc("Processing data for Garmin Notifications") + logfunc("Processing data for Nike Notifications") file_found = str(files_found[0]) db = open_sqlite_db_readonly(file_found) @@ -70,6 +70,6 @@ def get_nike_notifications(files_found, report_folder, seeker, wrap_text): __artifacts__ = { "NikeNotifications": ( "Nike-Run", - ('*/com.nike.plusgps/databases/ns_inbox.db*'), + ('*/com.nike.plusgps/databases/ns_inbox.db'), get_nike_notifications) } diff --git a/scripts/artifacts/NikePolyline.py b/scripts/artifacts/NikePolyline.py index c2a6651c..031c0af0 100644 --- a/scripts/artifacts/NikePolyline.py +++ b/scripts/artifacts/NikePolyline.py @@ -41,8 +41,8 @@ def get_nike_polyline(files_found, report_folder, seeker, wrap_text): usageentries = len(all_rows) if usageentries > 0: logfunc(f'Found {usageentries} activity_polyline entries') - report = ArtifactHtmlReport('Activity Route') - report.start_artifact_report(report_folder, 'Activity Route') + report = ArtifactHtmlReport('Nike - Activity Route') + report.start_artifact_report(report_folder, 'Nike - Activity Route') report.add_script() data_headers = ('Activity ID', 'Start Time UTC', 'End Time UTC', 'Duration', 'Coordinates File', 'Button') data_list = [] diff --git a/scripts/artifacts/RunkeeperActivities.py b/scripts/artifacts/RunkeeperActivities.py index 7cd5ce03..bcd30d2e 100644 --- a/scripts/artifacts/RunkeeperActivities.py +++ b/scripts/artifacts/RunkeeperActivities.py @@ -187,6 +187,6 @@ def get_run_activities(files_found, report_folder, seeker, wrap_text): __artifacts__ = { "RunkeeperActivities": ( "Runkeeper", - ('*com.fitnesskeeper.runkeeper.pro/databases/RunKeeper.sqlite*'), + ('*com.fitnesskeeper.runkeeper.pro/databases/RunKeeper.sqlite'), get_run_activities) } From f333adbfd08a1979be29377eb0f882ac134de738 Mon Sep 17 00:00:00 2001 From: Fabian Nunes Date: Mon, 27 Mar 2023 15:33:53 +0100 Subject: [PATCH 2/3] Fixed bug polyline and database --- scripts/artifacts/AdidasActivities.py | 10 ++++++++-- scripts/artifacts/AdidasUser.py | 5 +++-- scripts/artifacts/MMWActivities.py | 2 +- scripts/artifacts/MMWUsers.py | 2 +- scripts/artifacts/RunkeeperActivities.py | 4 ++-- 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/scripts/artifacts/AdidasActivities.py b/scripts/artifacts/AdidasActivities.py index 4175af7e..d9320e35 100644 --- a/scripts/artifacts/AdidasActivities.py +++ b/scripts/artifacts/AdidasActivities.py @@ -15,7 +15,7 @@ def get_adidas_activities(files_found, report_folder, seeker, wrap_text): logfunc("Processing data for Adidas Activities") - files_found = [x for x in files_found if not x.endswith('wal') and not x.endswith('shm')] + files_found = [x for x in files_found if not x.endswith('-journal')] file_found = str(files_found[0]) db = open_sqlite_db_readonly(file_found) @@ -67,7 +67,13 @@ def get_adidas_activities(files_found, report_folder, seeker, wrap_text): humidity = 'N/A' poly = row[15] if poly: - coordinates = polyline.decode(poly) + # logfunc(f"Polyline: {poly}") + try: + coordinates = polyline.decode(poly) + except: + logfunc(f"Polyline: {poly} could not be decoded") + poly = None + break place_lat = [] place_lon = [] for coordinate in coordinates: diff --git a/scripts/artifacts/AdidasUser.py b/scripts/artifacts/AdidasUser.py index 79be3e0d..b645721b 100644 --- a/scripts/artifacts/AdidasUser.py +++ b/scripts/artifacts/AdidasUser.py @@ -10,7 +10,8 @@ def get_adidas_user(files_found, report_folder, seeker, wrap_text): - logfunc("Processing data for Garmin Sync") + logfunc("Processing data for Adidas User") + files_found = [x for x in files_found if not x.endswith('-journal')] file_found = str(files_found[0]) db = open_sqlite_db_readonly(file_found) @@ -95,6 +96,6 @@ def get_adidas_user(files_found, report_folder, seeker, wrap_text): __artifacts__ = { "AdidasUser": ( "Adidas-Running", - ('*com.runtastic.android/databases/user.db'), + ('*com.runtastic.android/databases/user.db*'), get_adidas_user) } diff --git a/scripts/artifacts/MMWActivities.py b/scripts/artifacts/MMWActivities.py index 203c3747..8cdc1aa1 100644 --- a/scripts/artifacts/MMWActivities.py +++ b/scripts/artifacts/MMWActivities.py @@ -211,6 +211,6 @@ def get_map_activities(files_found, report_folder, seeker, wrap_text): __artifacts__ = { "MapWalkActivities": ( "Map-My-Walk", - ('*com.mapmywalk.android2/databases/workout.db'), + ('*com.mapmywalk.android2/databases/workout.db*'), get_map_activities) } diff --git a/scripts/artifacts/MMWUsers.py b/scripts/artifacts/MMWUsers.py index e529e017..af3575ae 100644 --- a/scripts/artifacts/MMWUsers.py +++ b/scripts/artifacts/MMWUsers.py @@ -10,7 +10,7 @@ def get_map_users(files_found, report_folder, seeker, wrap_text): logfunc("Processing data for Map My Walk Users") - files_found = [x for x in files_found if not x.endswith('wal') and not x.endswith('shm')] + files_found = [x for x in files_found if not x.endswith('-journal') and not x.endswith('_gear') and not x.endswith('_gear-journal')] file_found = str(files_found[0]) db = open_sqlite_db_readonly(file_found) diff --git a/scripts/artifacts/RunkeeperActivities.py b/scripts/artifacts/RunkeeperActivities.py index bcd30d2e..f18fd421 100644 --- a/scripts/artifacts/RunkeeperActivities.py +++ b/scripts/artifacts/RunkeeperActivities.py @@ -14,7 +14,7 @@ def get_run_activities(files_found, report_folder, seeker, wrap_text): logfunc("Processing data for Runkeeper Activities") - files_found = [x for x in files_found if not x.endswith('wal') and not x.endswith('shm')] + files_found = [x for x in files_found if not x.endswith('-journal')] file_found = str(files_found[0]) db = open_sqlite_db_readonly(file_found) @@ -187,6 +187,6 @@ def get_run_activities(files_found, report_folder, seeker, wrap_text): __artifacts__ = { "RunkeeperActivities": ( "Runkeeper", - ('*com.fitnesskeeper.runkeeper.pro/databases/RunKeeper.sqlite'), + ('*com.fitnesskeeper.runkeeper.pro/databases/RunKeeper.sqlite*'), get_run_activities) } From 67ec04c423de0a6f8acd0b0bc1d6b15f525b70a5 Mon Sep 17 00:00:00 2001 From: Fabian Nunes Date: Mon, 27 Mar 2023 15:37:14 +0100 Subject: [PATCH 3/3] Fixed bug polyline and database --- scripts/artifacts/NikeNotifications.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/artifacts/NikeNotifications.py b/scripts/artifacts/NikeNotifications.py index 8a15a2d3..89b59fc0 100644 --- a/scripts/artifacts/NikeNotifications.py +++ b/scripts/artifacts/NikeNotifications.py @@ -10,6 +10,7 @@ def get_nike_notifications(files_found, report_folder, seeker, wrap_text): logfunc("Processing data for Nike Notifications") + files_found = [x for x in files_found if not x.endswith('-journal')] file_found = str(files_found[0]) db = open_sqlite_db_readonly(file_found) @@ -70,6 +71,6 @@ def get_nike_notifications(files_found, report_folder, seeker, wrap_text): __artifacts__ = { "NikeNotifications": ( "Nike-Run", - ('*/com.nike.plusgps/databases/ns_inbox.db'), + ('*/com.nike.plusgps/databases/ns_inbox.db*'), get_nike_notifications) }