Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
ftp-deploy
Advanced tools
Ftp a folder from your local disk to an ftp destination. Does not delete from destination directory. Derived from grunt-ftp-deploy
Ftp a folder from your local disk to a remote ftp destination. Does not delete from destination directory.
A Node.js package.
The most basic usage (stops uploading when an error occurs):
var FtpDeploy = require('ftp-deploy');
var ftpDeploy = new FtpDeploy();
var config = {
username: "username",
password: "password", // optional, prompted if none given
host: "ftp.someserver.com",
port: 21,
localRoot: __dirname + "/local-folder",
remoteRoot: "/public_html/remote-folder/",
exclude: ['.git', '.idea', 'tmp/*']
}
ftpDeploy.deploy(config, function(err) {
if (err) console.log(err)
else console.log('finished');
});
To be notified of what ftpDeploy is doing:
ftpDeploy.on('uploading', function(data) {
data.totalFileCount; // total file count being transferred
data.transferredFileCount; // number of files transferred
data.percentComplete; // percent as a number 1 - 100
data.filename; // partial path with filename being uploaded
});
ftpDeploy.on('uploaded', function(data) {
console.log(data); // same data as uploading event
});
To continue uploading files even if a file upload fails:
config.continueOnError = true;
ftpDeploy.deploy(config, function(err) {
if (err) console.log(err) // error authenticating or creating/traversing directory
else console.log('finished');
});
ftpDeploy.on('upload-error', function (data) {
console.log(data.err); // data will also include filename, relativePath, and other goodies
});
1.0.0
0.7.x
0.6.x
continueOnError
config. When set to true, ftp-deploy continues to upload files after a failed put. When not specified or set to false, the .deploy()
callback is called immediately after a failed put.upload-error
eventstopOnError
config setting in preference of continueOnError
0.5.x
stopOnError
to configuration.error
event.0.4.x
0.3.x
exclude
can be used to exclude folders/files from the ftp deploy process0.2.x
paralleluploads
: sets number of parallelUploads (within a specific folder)transferred
and total
. Useful for determining progress based on file count.npm install ftp-deploy
MIT
1.0.0
FAQs
Ftp a folder from your local disk to an ftp destination
The npm package ftp-deploy receives a total of 8,080 weekly downloads. As such, ftp-deploy popularity was classified as popular.
We found that ftp-deploy demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.