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.
awy2是一个基于Node.js的HTTP/2模块开发的Web框架,基于async/await关键字。
const awy = require('awy2');
var ar = new awy();
ar.config.https_on = true;
ar.config.https_options.cert = '../rsa/localhost-cert.pem';
ar.config.https_options.key = '../rsa/localhost-privkey.pem';
/*
一定要注意的是:
回调函数要写成async rr的形式。
rr是打包了request和response的对象:
{
req,
res
}
*/
ar.get('/', async rr => {
rr.res.Body = 'success';
});
ar.run('localhost', 8080);
curl 'http://localhost:8080/'
输出结果:
success
const awy = require('awy2');
var ar = new awy();
ar.config.https_on = true;
ar.config.https_options.cert = '../rsa/localhost-cert.pem';
ar.config.https_options.key = '../rsa/localhost-privkey.pem';
ar.get('/test', async rr => {
var {name} = rr.req.Param;
console.log(name);
rr.res.Body = name;
});
ar.run('localhost', 8080);
curl 'http://localhost:8080/test?name=helo'
输出结果:
helo
const awy = require('awy');
var ar = new awy();
ar.config.https_on = true;
ar.config.https_options.cert = '../rsa/localhost-cert.pem';
ar.config.https_options.key = '../rsa/localhost-privkey.pem';
ar.post('/pt', async rr => {
var {username} = rr.req.BodyParam;
rr.res.Body = username;
});
ar.run('localhost', 8080);
curl 'http://localhost:8080/pt' -d 'username=albert'
返回结果:
albert
FAQs
simple,small web framework
The npm package awy2 receives a total of 0 weekly downloads. As such, awy2 popularity was classified as not popular.
We found that awy2 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.