fix smbios for amt detection under linux
Signed-off-by: si458 <simonsmith5521@gmail.com>
si458 committed
Jan 1, 2026 at 19:39 UTC
478c7a8768f9ca163d1c1b66f157cd66d7c444a6
2 files changed
+4
-4
agents/modules_meshcmd/smbios.js
+2
-2
@@ -56,7 +56,7 @@ function SMBiosTables()
56
var stringsFinal = [];
57
for (var strx in strings) {
58
var tmp = strings[strx].trim().replaceAll(' ', '').replaceAll('\x09', '');
59
- if (!(tmp[0] == '"')) { stringsFinal.push(tmp); }
59
+ if (tmp && tmp[0] !== '"' && /^[0-9a-fA-F]+$/.test(tmp)) { stringsFinal.push(tmp); }
60
}
61
ms.write(Buffer.from(stringsFinal.join(''), 'hex'));
62
ms.write(Buffer.from('00', 'hex'));
@@ -178,7 +178,7 @@ function SMBiosTables()
178
}
179
try
180
{
181
- r.systemSlots = this.systemInfo(data);
181
+ r.systemSlots = this.systemSlots(data);
182
}
183
catch(e)
184
{
agents/modules_meshcore/smbios.js
+2
-2
@@ -56,7 +56,7 @@ function SMBiosTables()
56
var stringsFinal = [];
57
for (var strx in strings) {
58
var tmp = strings[strx].trim().replaceAll(' ', '').replaceAll('\x09', '');
59
- if (!(tmp[0] == '"')) { stringsFinal.push(tmp); }
59
+ if (tmp && tmp[0] !== '"' && /^[0-9a-fA-F]+$/.test(tmp)) { stringsFinal.push(tmp); }
60
}
61
ms.write(Buffer.from(stringsFinal.join(''), 'hex'));
62
ms.write(Buffer.from('00', 'hex'));
@@ -178,7 +178,7 @@ function SMBiosTables()
178
}
179
try
180
{
181
- r.systemSlots = this.systemInfo(data);
181
+ r.systemSlots = this.systemSlots(data);
182
}
183
catch(e)
184
{