New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@hoobs/network

Package Overview
Dependencies
Maintainers
3
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hoobs/network

Library for interacting with network interfaces on Debian based systems.

latest
Source
npmnpm
Version
1.0.20
Version published
Maintainers
3
Created
Source

Library for interacting with network interfaces on Debian based systems.

Prerequisites

This library is designed for Debian systems, and requires a few packages to be installed.

sudo apt install wpasupplicant network-manager dnsmasq hostapd

Next you need to disable the dnsmasq and hostapd services. These services will be dynamically configured and controled by this library.

sudo systemctl disable dnsmasq
sudo systemctl disable hostapd

Installing

HOOBS recommends Yarn. From your project's root run;

yarn add @hoobs/network

Or using NPM.

npm install @hoobs/network

Usage

First inport this into your code.

const network = require("./network");

Fetch a list of active connections.

const connections = network.current();

if (network.connected) {
    console.log(connections);
}

Fetch a list of network devices.

const devices = network.devices();

Fetch a list of available wireless networks.

const networks = network.wireless.scan();

Connect/Disconnect a wireless network.

network.wireless.connect("ssid", "password");
network.wireless.disconnect();

Forget a network.

network.wireless.forget("ssid");

Up/Down a wired connection.

network.ethernet.up("eth0");
network.ethernet.down("eth0");

HOOBS and the HOOBS logo are registered trademarks of HOOBS Inc. Copyright (C) 2021 HOOBS Inc. All rights reserved.

FAQs

Package last updated on 02 May 2022

Did you know?

Socket

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.

Install

Related posts