Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
wifi-controller
Advanced tools
wifi-controller
is a Node.js module that allows you to manage Wi-Fi on and off states programmatically on macOS and Windows. It provides a simple API to turn Wi-Fi on, off, toggle the state, and restart the Wi-Fi adapter.
You can install wifi-controller
using npm:
npm install wifi-controller
Here is a simple example to demonstrate how to use wifi-controller:
const WifiController = require("wifi-controller");
(async () => {
await WifiController.off();
console.log("Wi-Fi is off");
await WifiController.on();
console.log("Wi-Fi is on");
const name = await WifiController.device();
console.log(`Wi-Fi device name: ${name}`);
const isOn = await WifiController.isOn();
console.log(`Wi-Fi is ${isOn ? "on" : "off"}`);
})();
WifiController
All methods return a Promise.
on()
Turns the Wi-Fi on.
off()
Turns the Wi-Fi off.
toggle(force)
Toggles the Wi-Fi state. Optionally pass a boolean to force a state.
restart()
Restarts the Wi-Fi (turns it off and then on).
isOn()
Returns a Promise indicating whether the Wi-Fi is on.
device()
Returns a Promise with the Wi-Fi device name.
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
Manage Wi-Fi state on macOS, Windows, and Linux
The npm package wifi-controller receives a total of 2 weekly downloads. As such, wifi-controller popularity was classified as not popular.
We found that wifi-controller demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.