add linux bios serial

Signed-off-by: Simon Smith <simonsmith5521@gmail.com>
This commit is contained in:
Simon Smith 2023-10-04 19:51:59 +00:00
parent 14c3816fc9
commit 75a92ce485

View File

@ -1830,6 +1830,11 @@ function getSystemInformation(func) {
results.hardware.identifiers['bios_serial'] = values[0]['SerialNumber'];
} catch (ex) { }
}
if(results.hardware && results.hardware.linux) {
if (require('fs').statSync('/sys/class/dmi/id/product_serial').isFile()){
results.hardware.identifiers['bios_serial'] = require('fs').readFileSync('/sys/class/dmi/id/product_serial').toString().trim();
}
}
results.hardware.agentvers = process.versions;
replaceSpacesWithUnderscoresRec(results);
var hasher = require('SHA384Stream').create();