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.
基于http/1.1-chunked + async实现的一种数据分块加载技术。
Either through forking or by using npm (the recommended way):
npm install data-chunk
And data-chunk will be installed in to your node-project.
// ...
var dc = require('data-chunk');
app.get('/', function(req, res, next){
res.render('index', function(error, html){
res.write(html); //先加载页面框架dom,并开启chunked模式
dc.response(res); //设置下dc所需要的response
dc.dcseries({
one: function(callback){
setTimeout(function(){
callback(null, 1);
}, 200);
},
two: function(callback){
setTimeout(function(){
callback(null, 2);
}, 100);
}
},
function(err, results) {
console.log(results);
//此时已经自动调用res.end(),不必显示加载
// results is now equal to: {one: 1, two: 2}
});
});
//如果有前端库ICAT,数据会存放在ICAT.PAGEDATA中;如果无,则存放在window.PAGEDATA中
});
同async的所有方法;
同async的所有方法;
以上方法会自动获取每条task数据,写入PAGEDATA
同async的所有方法;
MIT
FAQs
data chunked
We found that data-chunk 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.