Socket
Socket
Sign inDemoInstall

systeminformation

Package Overview
Dependencies
0
Maintainers
1
Versions
645
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.22.0 to 5.22.1

44

lib/wifi.js

@@ -543,2 +543,7 @@ 'use strict';

function formatBssid(s) {
s = s.replace(/</g, '').replace(/>/g, '').match(/.{1,2}/g);
return s.join(':');
}
function wifiConnections(callback) {

@@ -610,8 +615,13 @@

const model = util.getValue(lines, 'hardware', ':', true);
cmd = '/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I';
cmd = '/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I 2>/dev/null; echo "######" ; ioreg -n AppleBCMWLANSkywalkInterface -r 2>/dev/null';
exec(cmd, function (error, stdout) {
const lines2 = stdout.toString().split('\n');
if (lines.length > 10) {
const parts = stdout.toString().split('######');
const lines2 = parts[0].split('\n');
let lines3 = [];
if (parts[1].indexOf(' | {') > 0 && parts[1].indexOf(' | }') > parts[1].indexOf(' | {')) {
lines3 = parts[1].split(' | {')[1].split(' | }')[0].replace(/ \| /g, '').replace(/"/g, '').split('\n');
}
if (lines2.length > 10) {
const ssid = util.getValue(lines2, 'ssid', ':', true);
const bssid = util.getValue(lines2, 'bssid', ':', true);
const bssid = util.getValue(lines2, 'bssid', ':', true) || formatBssid(util.getValue(lines3, 'IO80211BSSID', '=', true));
const security = util.getValue(lines2, 'link auth', ':', true);

@@ -641,2 +651,28 @@ const txRate = util.getValue(lines2, 'lastTxRate', ':', true);

}
if (lines3.length > 10) {
const ssid = util.getValue(lines3, 'IO80211SSID', '=', true);
const bssid = formatBssid(util.getValue(lines3, 'IO80211BSSID', '=', true));
const security = '';
const txRate = -1;
const signalLevel = -1;
const quality = -1;
const channel = util.getValue(lines3, 'IO80211Channel', '=', true);
const type = '802.11';
if ((ssid || bssid) && !result.length) {
result.push({
id: 'Wi-Fi',
iface,
model,
ssid,
bssid,
channel: util.toInt(channel),
frequency: channel ? wifiFrequencyFromChannel(channel) : null,
type,
security,
signalLevel,
quality,
txRate
});
}
}
if (callback) {

@@ -643,0 +679,0 @@ callback(result);

2

package.json
{
"name": "systeminformation",
"version": "5.22.0",
"version": "5.22.1",
"description": "Advanced, lightweight system and OS information library",

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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc