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.
$ npm install down-file -S 或者 yarn add down-file
import downloadFile from 'down-file';
downloadFile('http://domain.asset.test.png','test.png',{
progress(e){
console.log(e)
},
success(e){
console.log(e)
},
failed(e){
console.log(e)
},
complete(e){
console.log(e)
}
},{token:'123'})
Type: string
文件下载地址
Type: string
下载文件保存的名字,注意,需要带文件对应的扩展名 如果 .jpg .zip 等
Type: Object
Type: function
文件下载的进度回调函数,参数是 ProgressEvent 类型,可以获取文件的总大小,和当前已下载的大小
注意 使用该方法需服务端设置响应头,文件的大小 Content-Length 属性, eg: ctx.set('Content-Length', file.size)
Type: function
文件下载成功的回调函数,参数是 ProgressEvent 类型
Type: function
文件下载失败的回调函数,参数是 ProgressEvent 类型
Type: function
文件下载无论成功还是失败回调函数,参数是 ProgressEvent 类型
Type: object
http headers to post, available in modern browsers
FAQs
download file
The npm package down-file receives a total of 0 weekly downloads. As such, down-file popularity was classified as not popular.
We found that down-file 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.