change EreuseWorkbench for workbench-script
This commit is contained in:
parent
a9e39dcd3d
commit
a0548b38c7
|
@ -67,7 +67,7 @@ class Evidence:
|
||||||
for xa in matches:
|
for xa in matches:
|
||||||
self.doc = json.loads(xa.document.get_data())
|
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"]
|
dmidecode_raw = self.doc["data"]["dmidecode"]
|
||||||
self.dmi = DMIParse(dmidecode_raw)
|
self.dmi = DMIParse(dmidecode_raw)
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ class Evidence:
|
||||||
self.created = self.annotations.last().created
|
self.created = self.annotations.last().created
|
||||||
|
|
||||||
def get_components(self):
|
def get_components(self):
|
||||||
if self.doc.get("software") != "EreuseWorkbench":
|
if self.doc.get("software") != "workbench-script":
|
||||||
return self.doc.get('components', [])
|
return self.doc.get('components', [])
|
||||||
self.set_components()
|
self.set_components()
|
||||||
return self.components
|
return self.components
|
||||||
|
@ -92,7 +92,7 @@ class Evidence:
|
||||||
return ""
|
return ""
|
||||||
return list(self.doc.get('kv').values())[0]
|
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.doc['device']['manufacturer']
|
||||||
|
|
||||||
return self.dmi.manufacturer().strip()
|
return self.dmi.manufacturer().strip()
|
||||||
|
@ -104,13 +104,13 @@ class Evidence:
|
||||||
return ""
|
return ""
|
||||||
return list(self.doc.get('kv').values())[1]
|
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.doc['device']['model']
|
||||||
|
|
||||||
return self.dmi.model().strip()
|
return self.dmi.model().strip()
|
||||||
|
|
||||||
def get_chassis(self):
|
def get_chassis(self):
|
||||||
if self.doc.get("software") != "EreuseWorkbench":
|
if self.doc.get("software") != "workbench-script":
|
||||||
return self.doc['device']['model']
|
return self.doc['device']['model']
|
||||||
|
|
||||||
chassis = self.dmi.get("Chassis")[0].get("Type", '_virtual')
|
chassis = self.dmi.get("Chassis")[0].get("Type", '_virtual')
|
||||||
|
|
|
@ -57,7 +57,7 @@ class Build:
|
||||||
}
|
}
|
||||||
|
|
||||||
def get_hid_14(self):
|
def get_hid_14(self):
|
||||||
if self.json.get("software") == "EreuseWorkbench":
|
if self.json.get("software") == "workbench-script":
|
||||||
hid = self.get_hid(self.json)
|
hid = self.get_hid(self.json)
|
||||||
else:
|
else:
|
||||||
device = self.json['device']
|
device = self.json['device']
|
||||||
|
|
Loading…
Reference in New Issue