Skip to content

Commit

Permalink
Nissan Altima - Phone Config
Browse files Browse the repository at this point in the history
Phone and profile configurations to include bluetooth.
  • Loading branch information
abrignoni committed Feb 14, 2023
1 parent 3f7e5c9 commit 4411759
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
61 changes: 61 additions & 0 deletions scripts/artifacts/phoneconfigAltima.py
Original file line number Diff line number Diff line change
@@ -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)
}
2 changes: 2 additions & 0 deletions scripts/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down

0 comments on commit 4411759

Please sign in to comment.