
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
众所周知,js是一门单线程语言,一次异步,处处异步,但有了node后,这门语言变开始走向了新的一个阶梯。可以使用多线程,多进程等!
工作原理: 本包就是利用了多进程的同步函数,使得异步变为同步,参考文献:点击访问
// 您需要将要运行的内容传入即可
//例如axios请求(good)
const killAsync = require('kill-async')
var js = `
const axios = require('axios');
axios('http://httpbin.org/ip').then(res => {
if (res.data) {
console.log(res.data);
}
}).catch(err=>{
console.log(err);
});
`
var data = killAsync(js)
console.log(data);
//bad
const killAsync = require('kill-async')
function js(){
const axios = require('axios');
axios('http://httpbin.org/ip').then(res => {
if (res.data) {
console.log(res.data);
}
}).catch(err=>{
console.log(err);
});
}
var data = killAsync(js())
console.log(data);
FAQs
杀死异步,逃离async,await地狱
The npm package kill-async receives a total of 0 weekly downloads. As such, kill-async popularity was classified as not popular.
We found that kill-async 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.