New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

m77-raspberry-wifi-node-nmcli

Package Overview
Dependencies
Maintainers
0
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

m77-raspberry-wifi-node-nmcli - npm Package Compare versions

Comparing version

to
1.7.6

2

package.json
{
"name": "m77-raspberry-wifi-node-nmcli",
"version": "1.7.2",
"version": "1.7.6",
"description": "Module in nodejs to configure Wifi connections on Raspberry Pi (managed by nmcli)",

@@ -5,0 +5,0 @@ "main": "./src/index.js",

@@ -213,3 +213,3 @@ class M77RaspberryWIFI {

let method, ipaddress, cidr, gateway, dns = '', netmask
if(!statusConn){
if (!statusConn) {
method = "auto"

@@ -271,7 +271,7 @@ ipaddress = ""

savedNetworks() {
savedNetworks(exclude_word = []) {
return new Promise(async (resolve, reject) => {
if (this.#ready === false) { resolve(this.#responseNoInterface()); return false }
const saved = await this.#nmcli(`-f NAME,TYPE,DEVICE,ACTIVE c | grep "wifi" | grep -w "${this.#device}"`) || ''
const saved = await this.#nmcli(`-f NAME,TYPE,DEVICE,ACTIVE c | grep "wifi"`) || ''

@@ -292,3 +292,7 @@ if (saved === false) { resolve({ success: false, code: 2021, msg: `It was not possible to obtain the list of saved Wi-Fi networks in inteface`, data: { device: this.#device } }); return false }

return null
}).filter((net) => net !== null)
})
.filter((net) => net !== null)
.filter(net =>
!exclude_word.includes(net.ssid) && !exclude_word.includes(net.device)
)

@@ -295,0 +299,0 @@

@@ -29,2 +29,3 @@ const {M77RaspberryWIFI} = require('./src/index')

/*

@@ -37,2 +38,8 @@ console.log("\n\nSaved Networks:")

/*
console.log("\n\nSaved Networks Excluding:")
const saved_exclude = await wifi.savedNetworks(['wlan0_ap', 'm77ap'])
console.log(saved_exclude)
*/
/*
console.log("\n\Turn off:")

@@ -39,0 +46,0 @@ const turn_off = await wifi.turnOff()