Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
mcp9808 is a free-to-use library for controlling the mcp9808 temperature sensor from the raspberry pi. It includes support for all commands highlighted in the sensor’s datasheet, and provides useful examples of how to use the library in the examples folder. The examples include tools from a basic command-line temperature reader to a complete web-based temperature controller. This codebase is managed by Isaac Zinda.
mcp9808 is available as an npm module. To download, simply run:
sudo npm install mcp9808 --unsafe-perm
Once the module is installed, navigate to the node_modules folder and enter into the mcp9808 directory. Then type:
sudo ./setup.sh
This command will automatically configure the raspberry pi to use I2C.
To start, import and initialize the module in your Node.js program.
var MCP9808 = new require('mcp9808');
MCP9808.Initialize(function(){
//your code here
});
All commands in this library use callbacks. For example, if you want to get the temperature and tne log it to the screen, use this code.
var MCP9808 = new require('mcp9808');
MCP9808.Initialize(function()
{
MCP9808.AmbientTemperature(function(error, data)
{
console.log(data);
});
});
To quickly learn how to use the mcp9808 sensor library, sample programs are available in the module’s example folder.
temperature.js is a bare-bones program that outputs the temperature to the console once a second. Navigate to node_modules/mcp9808/examples and run
sudo node temperature.js
graph.js provides a powerful web interface for using the mcp9808 sensor. To use, run:
sudo node graph.js
Then navigate to [ip address]:10000. Here you will see a graph of the sensor’s temperature readings and a list of commands to send to the sensor.
FAQs
node.js interface for the mcp9808 temperature sensor
The npm package mcp9808 receives a total of 0 weekly downloads. As such, mcp9808 popularity was classified as not popular.
We found that mcp9808 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.