diff --git a/agents/meshcore.js b/agents/meshcore.js index 2a7bc229..8b73f942 100644 --- a/agents/meshcore.js +++ b/agents/meshcore.js @@ -1825,6 +1825,15 @@ function getSystemInformation(func) { if (results.hardware.windows.osinfo) { delete results.hardware.windows.osinfo.Node; } if (results.hardware.windows.partitions) { for (var i in results.hardware.windows.partitions) { delete results.hardware.windows.partitions[i].Node; } } } catch (ex) { } + try { + var values = require('win-wmi').query('ROOT\\CIMV2', "SELECT * FROM Win32_Bios", ['SerialNumber']); + 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); diff --git a/views/default-mobile.handlebars b/views/default-mobile.handlebars index e050b84c..0158dbca 100644 --- a/views/default-mobile.handlebars +++ b/views/default-mobile.handlebars @@ -5970,6 +5970,7 @@ // BIOS if (ident.bios_vendor) { x += addDetailItem("Vendor", EscapeHtml(ident.bios_vendor), s); } if (ident.bios_version) { x += addDetailItem("Version", EscapeHtml(ident.bios_version), s); } + if (ident.bios_serial) { x += addDetailItem("Serial", EscapeHtml(ident.bios_serial), s); } if (x != '') { sections.push({ name: "BIOS", html: x, img: 'chip' }); } // Motherboard diff --git a/views/default.handlebars b/views/default.handlebars index 6c26849d..8b9bdb81 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -11665,6 +11665,7 @@ // BIOS if (ident.bios_vendor) { x += addDetailItem("Vendor", EscapeHtml(ident.bios_vendor), s); } if (ident.bios_version) { x += addDetailItem("Version", EscapeHtml(ident.bios_version), s); } + if (ident.bios_serial) { x += addDetailItem("Serial", EscapeHtml(ident.bios_serial), s); } if (x != '') { sections.push({ name: "BIOS", html: x, img: 'chip64.png' }); } // Motherboard