
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@winner-fed/ftp-deploy
Advanced tools
interface UserConfig {
/**
* 目标服务器登录用户
*/
user: string;
/**
* 目标服务器登录密码
*/
password: string;
/**
* 目标服务器主机地址,ftp 常用端口为21,sftp 为 22
*/
host: string;
/**
* 目标服务器端口
*/
port: number;
/**
* 本地路径
*/
localPath: string;
/**
* 目标服务器上传路径
*/
remotePath: string;
/**
* 包含的文件
*/
// ["*.php", "dist/*", ".*"]
include: Array<string>;
/**
* 不包含的文件
**/
// [
// "dist/**/*.map",
// "node_modules/**",
// "node_modules/**/.*",
// ".git/**",
// ]
exclude: Array<string>;
/**
* 上传之前,删除目标服务器路径的所有文件
* @default false
*/
deleteRemote: boolean;
/**
* @default true
*/
forcePasv: boolean;
/**
* 使用 sftp 或 ftp
* @default false
*/
sftp: boolean;
}
const { FtpDeployer } = require('@winner-fed/ftp-deploy');
const path = require('path');
const ftpDeploy = new FtpDeployer();
const config = {
localPath: path.join(__dirname, '/resource'),
remotePath: '/usr/local/nginx/html/deploy-test',
user: '***',
password: '****',
host: '****',
port: 22,
// include: ["*", "**/*"], // this would upload everything except dot files
include: ['*'],
// e.g. exclude sourcemaps, and ALL files in node_modules (including dot files)
exclude: ['dist/**/*.map', 'node_modules/**', 'node_modules/**/.*', '.git/**'],
// delete ALL existing files at destination before uploading, if true
deleteRemote: false,
// Passive mode is forced (EPSV command is not sent)
forcePasv: true,
// use sftp or ftp
sftp: true
};
ftpDeploy
.deploy(config)
.then((res) => console.log('上传成功:', res))
.catch((err) => console.log(err));
FAQs
FTP uploads local files to the target server
We found that @winner-fed/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.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.