systeminformation
Advanced tools
Comparing version 5.21.14 to 5.21.15
@@ -62,3 +62,3 @@ 'use strict'; | ||
try { | ||
const parts = execSync(cmd, { encoding: 'utf8' }).toString().split('\n\n'); | ||
const parts = execSync(cmd).toString().split('\n\n'); | ||
parts.forEach(element => { | ||
@@ -65,0 +65,0 @@ const lines = element.split('\n'); |
@@ -132,3 +132,3 @@ 'use strict'; | ||
try { | ||
const hdicon = execSync('hcitool con', { encoding: 'utf8' }).toString().toLowerCase(); | ||
const hdicon = execSync('hcitool con').toString().toLowerCase(); | ||
for (let i = 0; i < result.length; i++) { | ||
@@ -135,0 +135,0 @@ if (result[i].macDevice && result[i].macDevice.length > 10 && hdicon.indexOf(result[i].macDevice.toLowerCase()) >= 0) { |
@@ -142,3 +142,3 @@ 'use strict'; | ||
cmd = 'export LC_ALL=C; df -lkPTx squashfs; unset LC_ALL'; | ||
execSync('cat /proc/mounts 2>/dev/null', { encoding: 'utf8' }).toString().split('\n').filter(line => { | ||
execSync('cat /proc/mounts 2>/dev/null').toString().split('\n').filter(line => { | ||
return line.startsWith('/'); | ||
@@ -430,3 +430,3 @@ }).forEach((line) => { | ||
if (element.type.startsWith('raid')) { | ||
const lines = execSync(`mdadm --export --detail /dev/${element.name}`, { encoding: 'utf8' }).toString().split('\n'); | ||
const lines = execSync(`mdadm --export --detail /dev/${element.name}`).toString().split('\n'); | ||
const mdData = decodeMdabmData(lines); | ||
@@ -1092,3 +1092,3 @@ | ||
try { | ||
const out2 = execSync('export LC_ALL=C; lsblk -bPo NAME,TYPE,SIZE,FSTYPE,MOUNTPOINT,UUID,ROTA,RO,RM,LABEL,MODEL,OWNER,GROUP 2>/dev/null; unset LC_ALL', { encoding: 'utf8' }).toString(); | ||
const out2 = execSync('export LC_ALL=C; lsblk -bPo NAME,TYPE,SIZE,FSTYPE,MOUNTPOINT,UUID,ROTA,RO,RM,LABEL,MODEL,OWNER,GROUP 2>/dev/null; unset LC_ALL').toString(); | ||
let lines = blkStdoutToObject(out2).split('\n'); | ||
@@ -1106,3 +1106,3 @@ const data = parseBlk(lines); | ||
try { | ||
mediumType = execSync('cat /sys/block/' + logical + '/queue/rotational 2>/dev/null', { encoding: 'utf8' }).toString().split('\n')[0]; | ||
mediumType = execSync('cat /sys/block/' + logical + '/queue/rotational 2>/dev/null').toString().split('\n')[0]; | ||
} catch (e) { | ||
@@ -1413,3 +1413,3 @@ util.noop(); | ||
try { | ||
const smartDev = JSON.parse(execSync('smartctl --scan -j')); | ||
const smartDev = JSON.parse(execSync('smartctl --scan -j').toString()); | ||
if (smartDev && smartDev.devices && smartDev.devices.length > 0) { | ||
@@ -1416,0 +1416,0 @@ smartDev.devices.forEach((dev) => { |
@@ -219,3 +219,3 @@ 'use strict'; | ||
try { | ||
pciIDs = execSync('export LC_ALL=C; dmidecode -t 9 2>/dev/null; unset LC_ALL | grep "Bus Address: "', { encoding: 'utf8' }).toString().split('\n'); | ||
pciIDs = execSync('export LC_ALL=C; dmidecode -t 9 2>/dev/null; unset LC_ALL | grep "Bus Address: "').toString().split('\n'); | ||
for (let i = 0; i < pciIDs.length; i++) { | ||
@@ -222,0 +222,0 @@ pciIDs[i] = pciIDs[i].replace('Bus Address:', '').replace('0000:', '').trim(); |
@@ -402,3 +402,3 @@ 'use strict'; | ||
try { | ||
let stdout = execSync('cat /proc/cpuinfo 2>/dev/null', { encoding: 'utf8' }); | ||
let stdout = execSync('cat /proc/cpuinfo 2>/dev/null'); | ||
let lines = stdout.toString().split('\n'); | ||
@@ -423,3 +423,3 @@ let model = util.getValue(lines, 'hardware', ':', true).toUpperCase(); | ||
stdout = execSync('vcgencmd get_config sdram_freq 2>/dev/null', { encoding: 'utf8' }); | ||
stdout = execSync('vcgencmd get_config sdram_freq 2>/dev/null'); | ||
lines = stdout.toString().split('\n'); | ||
@@ -431,3 +431,3 @@ let freq = parseInt(util.getValue(lines, 'sdram_freq', '=', true), 10) || 0; | ||
stdout = execSync('vcgencmd measure_volts sdram_p 2>/dev/null', { encoding: 'utf8' }); | ||
stdout = execSync('vcgencmd measure_volts sdram_p 2>/dev/null'); | ||
lines = stdout.toString().split('\n'); | ||
@@ -434,0 +434,0 @@ let voltage = parseFloat(util.getValue(lines, 'volt', '=', true)) || 0; |
@@ -171,3 +171,3 @@ 'use strict'; | ||
try { | ||
const stdout = execSync('hostnamectl --json short 2>/dev/null', { encoding: 'utf8' }); | ||
const stdout = execSync('hostnamectl --json short 2>/dev/null'); | ||
const json = JSON.parse(stdout.toString()); | ||
@@ -178,3 +178,3 @@ | ||
try { | ||
const stdout = execSync('hostname -f 2>/dev/null', { encoding: 'utf8' }); | ||
const stdout = execSync('hostname -f 2>/dev/null'); | ||
fqdn = stdout.toString().split(os.EOL)[0]; | ||
@@ -181,0 +181,0 @@ } catch (e) { |
@@ -155,3 +155,3 @@ 'use strict'; | ||
try { | ||
const tmpsrv = execSync('systemctl --all --type=service --no-legend 2> /dev/null', { encoding: 'utf8' }).toString().split('\n'); | ||
const tmpsrv = execSync('systemctl --all --type=service --no-legend 2> /dev/null').toString().split('\n'); | ||
srvs = []; | ||
@@ -168,3 +168,3 @@ for (const s of tmpsrv) { | ||
srvString = ''; | ||
const tmpsrv = execSync('service --status-all 2> /dev/null', { encoding: 'utf8' }).toString().split('\n'); | ||
const tmpsrv = execSync('service --status-all 2> /dev/null').toString().split('\n'); | ||
for (const s of tmpsrv) { | ||
@@ -179,3 +179,3 @@ const parts = s.split(']'); | ||
try { | ||
const srvStr = execSync('ls /etc/init.d/ -m 2> /dev/null', { encoding: 'utf8' }).toString().split('\n').join(''); | ||
const srvStr = execSync('ls /etc/init.d/ -m 2> /dev/null').toString().split('\n').join(''); | ||
srvString = ''; | ||
@@ -182,0 +182,0 @@ if (srvStr) { |
@@ -64,3 +64,3 @@ 'use strict'; | ||
try { | ||
lines = execSync(cmd, { encoding: 'utf8' }).toString().split('\n'); | ||
lines = execSync(cmd).toString().split('\n'); | ||
result.manufacturer = result.manufacturer === '' ? util.getValue(lines, 'sys_vendor') : result.manufacturer; | ||
@@ -111,3 +111,3 @@ result.model = result.model === '' ? util.getValue(lines, 'product_name') : result.model; | ||
try { | ||
const disksById = execSync('ls -1 /dev/disk/by-id/ 2>/dev/null', { encoding: 'utf8' }).toString(); | ||
const disksById = execSync('ls -1 /dev/disk/by-id/ 2>/dev/null').toString(); | ||
if (disksById.indexOf('_QEMU_') >= 0) { | ||
@@ -134,3 +134,3 @@ result.virtual = true; | ||
try { | ||
const procInfo = execSync('dmidecode -t 4', { encoding: 'utf8' }); | ||
const procInfo = execSync('dmidecode -t 4'); | ||
const procLines = procInfo.toString().split('\n'); | ||
@@ -161,3 +161,3 @@ const procManufacturer = util.getValue(procLines, 'manufacturer', ':', true); | ||
try { | ||
const stdout = execSync('dmesg 2>/dev/null | grep -iE "virtual|hypervisor" | grep -iE "vmware|qemu|kvm|xen" | grep -viE "Nested Virtualization|/virtual/"', { encoding: 'utf8' }); | ||
const stdout = execSync('dmesg 2>/dev/null | grep -iE "virtual|hypervisor" | grep -iE "vmware|qemu|kvm|xen" | grep -viE "Nested Virtualization|/virtual/"'); | ||
// detect virtual machines | ||
@@ -376,3 +376,3 @@ let lines = stdout.toString().split('\n'); | ||
try { | ||
lines = execSync(cmd, { encoding: 'utf8' }).toString().split('\n'); | ||
lines = execSync(cmd).toString().split('\n'); | ||
result.vendor = !result.vendor ? util.getValue(lines, 'bios_vendor') : result.vendor; | ||
@@ -491,3 +491,3 @@ result.version = !result.version ? util.getValue(lines, 'bios_version') : result.version; | ||
try { | ||
lines = execSync(cmd, { encoding: 'utf8' }).toString().split('\n'); | ||
lines = execSync(cmd).toString().split('\n'); | ||
result.manufacturer = !result.manufacturer ? util.getValue(lines, 'board_vendor') : result.manufacturer; | ||
@@ -516,11 +516,13 @@ result.model = !result.model ? util.getValue(lines, 'board_name') : result.model; | ||
} | ||
const hardware = util.getValue(linesRpi, 'hardware'); | ||
if (hardware.startsWith('BCM')) { | ||
const rpi = util.decodePiCpuinfo(linesRpi); | ||
result.manufacturer = rpi.manufacturer; | ||
result.model = 'Raspberry Pi'; | ||
result.serial = rpi.serial; | ||
result.version = rpi.type + ' - ' + rpi.revision; | ||
result.memMax = os.totalmem(); | ||
result.memSlots = 0; | ||
if (linesRpi) { | ||
const hardware = util.getValue(linesRpi, 'hardware'); | ||
if (hardware.startsWith('BCM')) { | ||
const rpi = util.decodePiCpuinfo(linesRpi); | ||
result.manufacturer = rpi.manufacturer; | ||
result.model = 'Raspberry Pi'; | ||
result.serial = rpi.serial; | ||
result.version = rpi.type + ' - ' + rpi.revision; | ||
result.memMax = os.totalmem(); | ||
result.memSlots = 0; | ||
} | ||
} | ||
@@ -527,0 +529,0 @@ |
@@ -708,4 +708,2 @@ 'use strict'; | ||
s[i] === '&' || | ||
s[i] === '(' || | ||
s[i] === ')' || | ||
s[i] === ']' || | ||
@@ -716,2 +714,3 @@ s[i] === '#' || | ||
s[i] === '\n' || | ||
s[i] === '\r' || | ||
s[i] === '\'' || | ||
@@ -721,2 +720,4 @@ s[i] === '`' || | ||
s[i].length > 1 || | ||
(strict && s[i] === '(') || | ||
(strict && s[i] === ')') || | ||
(strict && s[i] === '@') || | ||
@@ -726,3 +727,3 @@ (strict && s[i] === ' ') || | ||
(strict && s[i] == ';') || | ||
(strict && s[i] == ')'))) { | ||
(strict && s[i] == '}'))) { | ||
result = result + s[i]; | ||
@@ -729,0 +730,0 @@ } |
@@ -130,3 +130,3 @@ 'use strict'; | ||
try { | ||
const all = execSync(cmd, { encoding: 'utf8' }).toString().split('\n').map(line => line.trim()).join('\n'); | ||
const all = execSync(cmd).toString().split('\n').map(line => line.trim()).join('\n'); | ||
const parts = all.split('\nInterface '); | ||
@@ -150,4 +150,4 @@ parts.shift(); | ||
try { | ||
const all = execSync('nmcli -t -f general,wifi-properties,wired-properties,interface-flags,capabilities,nsp device show 2>/dev/null', { encoding: 'utf8' }).toString(); | ||
const parts = all.split('\nGENERAL.DEVICE:'); | ||
const all = execSync('nmcli -t -f general,wifi-properties,wired-properties,interface-flags,capabilities,nsp device show 2>/dev/null').toString(); | ||
const parts = all.split('\n\n'); | ||
let i = 1; | ||
@@ -180,3 +180,3 @@ parts.forEach(ifaceDetails => { | ||
try { | ||
const lines = execSync(cmd, { encoding: 'utf8' }).toString().split('\n'); | ||
const lines = execSync(cmd).toString().split('\n'); | ||
const ssid = util.getValue(lines, 'GENERAL.CONNECTION'); | ||
@@ -199,3 +199,3 @@ return { | ||
try { | ||
const lines = execSync(cmd, { encoding: 'utf8' }).toString().split('\n'); | ||
const lines = execSync(cmd).toString().split('\n'); | ||
const bssid = util.getValue(lines, '802-11-wireless.seen-bssids').toLowerCase(); | ||
@@ -216,5 +216,8 @@ return { | ||
function wpaConnectionLinux(iface) { | ||
if (!iface) { | ||
return {}; | ||
} | ||
const cmd = `wpa_cli -i ${iface} status 2>&1`; | ||
try { | ||
const lines = execSync(cmd, { encoding: 'utf8' }).toString().split('\n'); | ||
const lines = execSync(cmd).toString().split('\n'); | ||
const freq = util.toInt(util.getValue(lines, 'freq', '=')); | ||
@@ -238,3 +241,3 @@ return { | ||
try { | ||
const stdout = execSync(cmd, { maxBuffer: 1024 * 20000, encoding: 'utf8' }); | ||
const stdout = execSync(cmd, { maxBuffer: 1024 * 20000 }); | ||
const parts = stdout.toString().split('ACTIVE:'); | ||
@@ -272,3 +275,3 @@ parts.shift(); | ||
try { | ||
let iwlistParts = execSync(`export LC_ALL=C; iwlist ${iface} scan 2>&1; unset LC_ALL`, { encoding: 'utf8' }).toString().split(' Cell '); | ||
let iwlistParts = execSync(`export LC_ALL=C; iwlist ${iface} scan 2>&1; unset LC_ALL`).toString().split(' Cell '); | ||
if (iwlistParts[0].indexOf('resource busy') >= 0) { return -1; } | ||
@@ -407,3 +410,3 @@ if (iwlistParts.length > 1) { | ||
try { | ||
const iwconfigParts = execSync('export LC_ALL=C; iwconfig 2>/dev/null; unset LC_ALL', { encoding: 'utf8' }).toString().split('\n\n'); | ||
const iwconfigParts = execSync('export LC_ALL=C; iwconfig 2>/dev/null; unset LC_ALL').toString().split('\n\n'); | ||
let iface = ''; | ||
@@ -410,0 +413,0 @@ iwconfigParts.forEach(element => { |
{ | ||
"name": "systeminformation", | ||
"version": "5.21.14", | ||
"version": "5.21.15", | ||
"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
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15731
741448