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.
JSON Fling is a simple JSON-RPC framework for NodeJS with built-in permissions and support for different transports.
JSON Fling is a simple JSON-RPC framework for NodeJS with built-in permissions and support for different transports.
Conforms to JSON RPC 2.0 Specification (http://www.jsonrpc.org/specification)
Server
// create express server the normal way
var express = require( 'express' );
var app = express();
// setup fling instance before you start the web service
var fling = require( 'fling' );
var transport = new fling.transports.receivers.Express( {
express: app,
url: '/rpc'
} );
var receiver = new fling.Receiver( {
baseDir: __dirname + '/lib/publicRpc' // this takes an absolute path
} );
receiver.addTransport( transport );
// start the web service
app.listen( 8080 );
Server RPC Module: /lib/publicRpc/a/path/to/a/node/module.js
module.exports.action = function( request, done ) {
done( 200, {
some: 'response',
for: [ 'you' ]
} );
};
Client
var request = require( 'request' );
request( {
url: 'http://somehost:8080/rpc',
json: {
jsonrpc: '2.0',
id: 100,
method: 'a.path.to.a.node.module.action',
params: {
your: 'params',
here: []
}
},
method: 'POST'
},
function( err, response, body ) {
console.log( body );
// outputs
// {
// jsonrpc: '2.0',
// id: 100,
// result: {
// some: 'response',
// for: [ 'you' ]
// }
// }
} );
More receiver transports: TCP Socket, in-process, and more Client transports to make an RPC call into a fling server
FAQs
JSON Fling is a simple JSON-RPC framework for NodeJS with built-in permissions and support for different transports.
The npm package fling receives a total of 2 weekly downloads. As such, fling popularity was classified as not popular.
We found that fling 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.