Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vleapp working #25

Merged
merged 3 commits into from
Feb 14, 2023
Merged
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
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