Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

systeminformation

Package Overview
Dependencies
Maintainers
1
Versions
653
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

systeminformation - npm Package Compare versions

Comparing version 5.21.4 to 5.21.5

48

lib/system.js

@@ -320,2 +320,8 @@ 'use strict';

function cleanDefaults(s) {
if (s === 'Default string') { s = ''; }
if (s.toLowerCase().indexOf('o.e.m.') !== -1) { s = ''; }
return s
}
function bios(callback) {

@@ -422,3 +428,3 @@

result.revision = util.getValue(lines, 'buildnumber', ':');
result.serial = util.getValue(lines, 'serialnumber', ':');
result.serial = cleanDefaults(util.getValue(lines, 'serialnumber', ':'));
}

@@ -560,3 +566,3 @@

const maxCapacityAttribute = win10plus ? 'MaxCapacityEx' : 'MaxCapacity';
workload.push(util.powerShell('Get-CimInstance Win32_baseboard | select Model,Manufacturer,Product,Version,SerialNumber,PartNumber,SKU | fl'));
workload.push(util.powerShell('Get-CimInstance Win32_baseboard | select Model,Manufacturer,Product,Version,SerialNumber,PartNumber,SKU,SMBIOSAssetTag | fl'));
workload.push(util.powerShell(`Get-CimInstance Win32_physicalmemoryarray | select ${maxCapacityAttribute}, MemoryDevices | fl`));

@@ -568,13 +574,16 @@ util.promiseAll(

result.manufacturer = util.getValue(lines, 'manufacturer', ':');
result.model = util.getValue(lines, 'model', ':');
result.manufacturer = cleanDefaults(util.getValue(lines, 'manufacturer', ':'));
result.model = cleanDefaults(util.getValue(lines, 'model', ':'));
if (!result.model) {
result.model = util.getValue(lines, 'product', ':');
result.model = cleanDefaults(util.getValue(lines, 'product', ':'));
}
result.version = util.getValue(lines, 'version', ':');
result.serial = util.getValue(lines, 'serialnumber', ':');
result.assetTag = util.getValue(lines, 'partnumber', ':');
result.version = cleanDefaults(util.getValue(lines, 'version', ':'));
result.serial = cleanDefaults(util.getValue(lines, 'serialnumber', ':'));
result.assetTag = cleanDefaults(util.getValue(lines, 'partnumber', ':'));
if (!result.assetTag) {
result.assetTag = util.getValue(lines, 'sku', ':');
result.assetTag = cleanDefaults(util.getValue(lines, 'sku', ':'));
}
if (!result.assetTag) {
result.assetTag = cleanDefaults(util.getValue(lines, 'SMBIOSAssetTag', ':'));
}

@@ -695,18 +704,17 @@ // memphysical

try {
util.powerShell('Get-CimInstance Win32_SystemEnclosure | select Model,Manufacturer,ChassisTypes,Version,SerialNumber,PartNumber,SKU | fl').then((stdout, error) => {
util.powerShell('Get-CimInstance Win32_SystemEnclosure | select Model,Manufacturer,ChassisTypes,Version,SerialNumber,PartNumber,SKU,SMBIOSAssetTag | fl').then((stdout, error) => {
if (!error) {
let lines = stdout.toString().split('\r\n');
result.manufacturer = util.getValue(lines, 'manufacturer', ':');
result.model = util.getValue(lines, 'model', ':');
result.manufacturer = cleanDefaults(util.getValue(lines, 'manufacturer', ':'));
result.model = cleanDefaults(util.getValue(lines, 'model', ':'));
const ctype = parseInt(util.getValue(lines, 'ChassisTypes', ':').replace(/\D/g, ''));
result.type = (ctype && !isNaN(ctype) && ctype < chassisTypes.length) ? chassisTypes[ctype - 1] : '';
result.version = util.getValue(lines, 'version', ':');
result.serial = util.getValue(lines, 'serialnumber', ':');
result.assetTag = util.getValue(lines, 'partnumber', ':');
result.sku = util.getValue(lines, 'sku', ':');
if (result.manufacturer.toLowerCase().indexOf('o.e.m.') !== -1) { result.manufacturer = '-'; }
if (result.version.toLowerCase().indexOf('o.e.m.') !== -1) { result.version = '-'; }
if (result.serial.toLowerCase().indexOf('o.e.m.') !== -1) { result.serial = '-'; }
if (result.assetTag.toLowerCase().indexOf('o.e.m.') !== -1) { result.assetTag = '-'; }
result.version = cleanDefaults(util.getValue(lines, 'version', ':'));
result.serial = cleanDefaults(util.getValue(lines, 'serialnumber', ':'));
result.assetTag = cleanDefaults(util.getValue(lines, 'partnumber', ':'));
if (!result.assetTag) {
result.assetTag = cleanDefaults(util.getValue(lines, 'SMBIOSAssetTag', ':'));
}
result.sku = cleanDefaults(util.getValue(lines, 'sku', ':'));
}

@@ -713,0 +721,0 @@

{
"name": "systeminformation",
"version": "5.21.4",
"version": "5.21.5",
"description": "Advanced, lightweight system and OS information library",

@@ -5,0 +5,0 @@ "license": "MIT",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc