Skip to content

Commit

Permalink
Merge pull request abrignoni#478 from abrignoni/Brigs-working
Browse files Browse the repository at this point in the history
Pirvacy dashbord update
  • Loading branch information
abrignoni authored Apr 16, 2024
2 parents c9cc6b2 + a3b0da6 commit 9ebec2c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion scripts/artifacts/FCMQueuedMessagesDump.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def get_fcm_dump(files_found, report_folder, seeker, wrap_text, time_offset):
for package, rows in package_tables.items():
report = ArtifactHtmlReport(f"Firebase Cloud Messaging Queued Messages Dump: {package}")
report_name = f"FCM-Dump-{package}"
scripts.ilapfuncs.logfunc(report_name)
report.start_artifact_report(report_folder, report_name)
report.add_script()
data_headers = ["Timestamp", "Originating File", "Record ID", "Key", "Value"]
Expand Down Expand Up @@ -124,7 +125,7 @@ def get_fcm_dump(files_found, report_folder, seeker, wrap_text, time_offset):
try:
datos = json.loads(datos)
except:
logfunc('Error reading json data')
scripts.ilapfuncs.logfunc('Error reading json data')
if (type(datos)) is dict:
data_list_clean.append((fecha, origfile, datos['text'], datos['title']))

Expand Down
6 changes: 4 additions & 2 deletions scripts/artifacts/discreteNative.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import datetime
import pathlib
import xml.etree.ElementTree as ET
from scripts.artifact_report import ArtifactHtmlReport
from scripts.ilapfuncs import logfunc, tsv, timeline, is_platform_windows, abxread, checkabx, logdevinfo
Expand All @@ -25,6 +26,7 @@ def get_discreteNative(files_found, report_folder, seeker, wrap_text, time_offse
data_list = []
for file_found in files_found:
file_found = str(file_found)
filename = str(pathlib.Path(file_found).name)

if os.path.isfile(file_found):
#check if file is abx
Expand Down Expand Up @@ -58,13 +60,13 @@ def get_discreteNative(files_found, report_folder, seeker, wrap_text, time_offse
ndattrib = ''
else:
ndattrib = round(int(ndattrib) / 60, 1)
data_list.append((timestampcalc(ntattrib), ptagattrib, atagattrib, oplist(otagattrib), ndattrib))
data_list.append((timestampcalc(ntattrib), ptagattrib, atagattrib, oplist(otagattrib), ndattrib, filename ))

if data_list:
report = ArtifactHtmlReport('Privacy Dashboard')
report.start_artifact_report(report_folder, 'Privacy Dashboard')
report.add_script()
data_headers = ('Timestamp', 'Bundle', 'Module', 'Operation', 'Usage in Seconds')
data_headers = ('Timestamp', 'Bundle', 'Module', 'Operation', 'Usage in Seconds', 'Source Filename')
report.write_artifact_data_table(data_headers, data_list, file_found)
report.end_artifact_report()

Expand Down

0 comments on commit 9ebec2c

Please sign in to comment.