
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
particle-blast
Advanced tools
Middleware to conveniently blast your Particle device with request details.
First, create a new instance and pass in device credentials
let ParticleBlast = require('particle-blast');
let blast = new ParticleBlast({
'device': [your device id],
'token': [your user token]
});
Calling the .fire()
method of the instance will return an Express/Connect compatible middlware function.
let express = require('express');
let app = express();
// using the blast instance we created previously
app.use(blast.fire([deviceFunction], [parseFunction], [callback]))
// ... continue configuring express app ...
Returns middleware function.
Arguments:
deviceFunction
- String, name of registered Particle Function you wish to invoke.
parseFunction
- Function, takes the request object as an argument. Use this to get whatever data you need from the request object. This will return the string data your registered Particle Function may require.
callback
- Function, callback to execute after your device returns an error and/or data.
let parseReq = function (req) {
return req.ip;
};
// arguments as passed by Particle Cloud
let callback = function (err, response, data) {
if(err) {
console.log('ERROR: ', err);
}
conosle.log('Returned by Particle Cloud: ', data);
};
app.use(blast.fire('ipToLCD', parseReq, callback));
A single blast instance can be reused to run multiple registered functions if multiple functions are registered to the same device.
app.use(blast.fire('fn1', parseOne, callbackOne));
app.use(blast.fire('fn2', parseTwo, callbackTwo));
FAQs
middleware to update your particle device
We found that particle-blast 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.