Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
sftpclient
is a simple to use sftp client to connect to remote FTP servers over ssh (SFTP) using username/password combo.
Uploads and downloads work with file-handles by default so as to not fill up the working directory with downloaded files when the desire was just to read and parse the data available at the remote server.
Default downloads are in bytes
mode mode=rb
, use an io.TextIOWrapper
to read the file as text.
Sample usage
from sftpclient import SFTPClient
# create client instance.
client = SFTPClient(
host=SFTPHOST,
username=YOURSFTPUSERNAME,
password=YOURSFTPPASSWORD,
use_known_hosts=UPTOYOUTODECIDE,
)
# Uploading files;
# 1. open a file (or use a `tempfile.TemporaryFile`).
with open('somefile') as file_to_upload:
# 2. use the `SFTPClient` `upload` method to pass the open file handle to
# the remote `destination`.
client.upload(file_to_upload, destination='/uploads')
# Downloading files;
file = client.download('/data/consume.txt', text=True)
# use `text=True` when downloading text files, default is `bytes` mode.
for line in file:
# continue with processing the file as desired, or just write it out to
# local disk.
FAQs
Username/Password SFTP Client
We found that sftpclient 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.