change EreuseWorkbench for workbench-script

This commit is contained in:
Cayo Puigdefabregas 2024-10-21 11:24:09 +02:00
parent a9e39dcd3d
commit a0548b38c7
2 changed files with 6 additions and 6 deletions

View file

@ -67,7 +67,7 @@ class Evidence:
for xa in matches:
self.doc = json.loads(xa.document.get_data())
if self.doc.get("software") == "EreuseWorkbench":
if self.doc.get("software") == "workbench-script":
dmidecode_raw = self.doc["data"]["dmidecode"]
self.dmi = DMIParse(dmidecode_raw)
@ -80,7 +80,7 @@ class Evidence:
self.created = self.annotations.last().created
def get_components(self):
if self.doc.get("software") != "EreuseWorkbench":
if self.doc.get("software") != "workbench-script":
return self.doc.get('components', [])
self.set_components()
return self.components
@ -92,7 +92,7 @@ class Evidence:
return ""
return list(self.doc.get('kv').values())[0]
if self.doc.get("software") != "EreuseWorkbench":
if self.doc.get("software") != "workbench-script":
return self.doc['device']['manufacturer']
return self.dmi.manufacturer().strip()
@ -104,13 +104,13 @@ class Evidence:
return ""
return list(self.doc.get('kv').values())[1]
if self.doc.get("software") != "EreuseWorkbench":
if self.doc.get("software") != "workbench-script":
return self.doc['device']['model']
return self.dmi.model().strip()
def get_chassis(self):
if self.doc.get("software") != "EreuseWorkbench":
if self.doc.get("software") != "workbench-script":
return self.doc['device']['model']
chassis = self.dmi.get("Chassis")[0].get("Type", '_virtual')

View file

@ -57,7 +57,7 @@ class Build:
}
def get_hid_14(self):
if self.json.get("software") == "EreuseWorkbench":
if self.json.get("software") == "workbench-script":
hid = self.get_hid(self.json)
else:
device = self.json['device']