From 441175903ed91247ac6440c14247a8a530a47f3f Mon Sep 17 00:00:00 2001 From: abrignoni Date: Mon, 13 Feb 2023 20:06:26 -0500 Subject: [PATCH] Nissan Altima - Phone Config Phone and profile configurations to include bluetooth. --- scripts/artifacts/phoneconfigAltima.py | 61 ++++++++++++++++++++++++++ scripts/report.py | 2 + 2 files changed, 63 insertions(+) create mode 100644 scripts/artifacts/phoneconfigAltima.py diff --git a/scripts/artifacts/phoneconfigAltima.py b/scripts/artifacts/phoneconfigAltima.py new file mode 100644 index 0000000..6df1b87 --- /dev/null +++ b/scripts/artifacts/phoneconfigAltima.py @@ -0,0 +1,61 @@ +import os + +from scripts.artifact_report import ArtifactHtmlReport +from scripts.ilapfuncs import logfunc, tsv, kmlgen, logdevinfo, is_platform_windows + +#Compatability Data +vehicles = ['Nissan Altima',] +platforms = ['-',] + +def get_phoneconfigAltima(files_found, report_folder, seeker, wrap_text): + + for file_found in files_found: + file_found = str(file_found) + + data_list = [] + start = None + + with open(file_found, 'r') as f: + for line in f.readlines(): + if '[' in line: + start = line.replace('[','') + start = start.replace(']','') + start = start.replace('_',' ') + start = start.strip() + + if '=' in line: + splitted = line.split('=') + key = splitted[0] + value = splitted[1] + if value == '\n': + continue + else: + data_list.append((key, value)) + + if line == '\n': + if start is None: + continue + else: + if len(data_list) > 0: + report = ArtifactHtmlReport(f'Phone Config {start}') + report.start_artifact_report(report_folder, f'Phone Config {start}') + report.add_script() + data_headers = ('Key','Value') + report.write_artifact_data_table(data_headers, data_list, file_found) + report.end_artifact_report() + + tsvname = f'Phone Config {start}' + tsv(report_folder, data_headers, data_list, tsvname) + + else: + logfunc(f'No Phone Config {start} data available') + + data_list = [] + + +__artifacts__ = { + "phoneConfig": ( + "Phone Config", + ('*/ffs/phone_config.dat'), + get_phoneconfigAltima) +} \ No newline at end of file diff --git a/scripts/report.py b/scripts/report.py index bebd2e6..73c72f9 100755 --- a/scripts/report.py +++ b/scripts/report.py @@ -25,6 +25,8 @@ def get_icon_name(category, artifact): else: icon = 'arrow-right-circle' elif category == 'BLUETOOTH': icon = 'bluetooth' + elif category == 'PHONE CONFIG': + icon = 'smartphone' elif category == 'VEHICLE INFO': icon = 'truck' elif category == 'AUDIO UUIDS':