
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.
A simple gem for copying, synching, and deleting entire folders over FTP. Adds
two new public methods to Net::FTP — put_dir
and
rmrf_dir
. put_dir
takes a hash of arguments:
put_dir
will overwrite any existing directories (default behavior is to update
changed files only).exclude
should be relative to local
rmrf_dir
takes two arguments: the path to the remote directory
to be deleted, and a verbose boolean flag (defaulted to false).
To use FTPExt, require it and use Net::FTP as normal. Because FTPExt requires Net::FTP for you, you don't need to include it separately.
require 'rubygems'
require 'ftp-ext'
ftp = Net::FTP.new('ftp/server/address')
ftp.login('username', 'password')
ftp.put_dir(:local => 'path/to/local', :remote => 'path/to/remote')
For example, imagine I have a local directory,
/Users/zpendleton/code
, that I want to upload on my server to the
/home/zpendleton
directory. I'd run the following command:
ftp.put_dir('/Users/zpendleton/code', '/home/zpendleton/code')
If the code
directory already exists in
/home/zpendleton
, it will be updated (the script checks the
last modified timestamps of all files). If the code
directory
doesn't exist, it will be created. To overwrite the code
directory on the server, set the :erase
option in
put_dir
to true
.
To later delete the /home/zpendleton/code
directory (in verbose
mode), you would use:
ftp.rmrf_dir('/home/zpendleton/code', true)
To leave verbose mode turned off, you would just omit the second parameter.
git checkout -b my_edit
).git commit -am "Added feature"
).git push origin my_edit
).Copyright (c) 2010 Zach Pendleton. See LICENSE for details.
FAQs
Unknown package
We found that ftp-ext 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 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.