Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
connman-simplified
Advanced tools
Node.js package that simplifies Connman (Opensource connection manager) usage. Uses connman-api.
Node.js package that simplifies Connman (Opensource connection manager) usage.
Enables you to easilly control connections over wifi and ethernet. Get realtime status changes.
Uses Connman-api package internally.
Connman: http://www.connman.net/
Try to connect to favorite wifi network, if fails become hotspot. Log the wifi state changes.
var connman = require('connman-simplified')();
connman.init(function(err) {
connman.initWiFi(function(err,wifi,properties) {
if(!properties.connected) { // not yet connected?
wifi.joinFavorite(function(err) {
if(err) wifi.openHotspot();
});
}
wifi.on('state',function(value) {
console.log("WiFi state change: ",value);
});
});
});
Join specific network, disconnect after 5 seconds.
var connman = require('connman-simplified')();
connman.init(function(err) {
connman.initWiFi(function(err,wifi,properties) {
wifi.join("myhomenetwork",'myPassphrase');
setTimeout(function() {
wifi.disconnect();
},5000);
});
});
Open a hotspot, get cached available networks, close after 5 seconds, get fresh available networks. Retrieving networks from cache is usefull because usually hardware can't scan while being hotspot.
var connman = require('connman-simplified')();
connman.init(function(err) {
connman.initWiFi(function(err,wifi,properties) {
wifi.openHotspot("myhotspot","aPassphrase",function(err) {
// get cached available networks (collected earlier)
wifi.getNetworksCache(function(err,list) {
console.log("networks from cache: ",list);
});
setTimeout(function() {
wifi.closeHotspot(function(err) {
// get fresh available networks
wifi.getNetworks(function(err,list) {
console.log("networks: ",list);
});
});
},5000);
});
});
});
Get a more readable networks list.
Uses common Connman services format, see: https://01.org/connman/documentation
var connman = require('connman-simplified')();
connman.init(function(err) {
connman.initWiFi(function(err,wifi,properties) {
wifi.getNetworks(function(err,list) {
// get more readable list using getServicesString:
console.log("networks: ",wifi.getServicesString(list));
});
});
});
Bigger interactive example is included.
Uses Debug package, to see all logs run:
$export DEBUG=*
Licensed under the MIT License
Peter Uithoven @ Doodle3D
FAQs
Node.js package that simplifies Connman (Opensource connection manager) usage. Uses connman-api.
The npm package connman-simplified receives a total of 2 weekly downloads. As such, connman-simplified popularity was classified as not popular.
We found that connman-simplified demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.