Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/artifacts/FacebookMessenger.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions scripts/artifacts/gmailEmails.py
Original file line number Diff line number Diff line change
Expand Up @@ -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','')
Expand Down
28 changes: 16 additions & 12 deletions scripts/artifacts/googleMapsGmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion scripts/artifacts/offlinePages.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down
41 changes: 23 additions & 18 deletions scripts/artifacts/wellbeing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down