
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
@tpisto/ftp-any-get
Advanced tools
Node.js native module to get file from FTP, FTPS and SFTP sources.
Get file from the ftp server (index.mjs)
import { getFile } from "@tpisto/ftp-any-get"
async function main() {
// Fetch from FTP server
let ftpFile = await getFile("ftp://demo:password@my-ftp-server.net/my-file.txt");
// Fetch from FTP server using TLS
let ftpsFile = await getFile("ftps://demo:password@my-ftp-server.net/my-file.txt");
// Fetch file using SFTP. SFTP runs over the SSH protocol.
let sftpFile = await getFile("sftp://demo:password@my-ftp-server.net/my-file.txt");
}
main();
If you want to accept_invalid_certs š®, you can disable cert checks by adding "accept_invalid_certs" parameter to function.
import { getFile } from "@tpisto/ftp-any-get"
async function main() {
// Fetch from FTP server using TLS and use "danger_accept_invalid_certs"
let ftpsFile = await getFile("ftps://demo:password@my-ftp-server.net/my-file.txt", true);
}
main();
npm install @tpisto/ftp-any-get
or
yarn add @tpisto/ftp-any-get
ā ļø You need to have "ca-certificates" installed in the system. For example "node:16" docker container has that already, but "node:16-slim" does not. So in "slim" containers you need to install "ca-certificates" package. If you do not have "ca-certificates" in your system, you can use "FTP" and "SFTP", but "FTPS" will fail with error thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: SecureError("error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914: (unable to get local issuer certificate)")', src/ftp_ftps.rs:24:8
node12 | node14 | node16 | |
---|---|---|---|
macOS x64 | ā | ā | ā |
macOS aarch64 | ā | ā | ā |
Linux x64 gnu | ā | ā | ā |
Linux aarch64 gnu | ā | ā | ā |
FAQs
Node.js native module to get file from FTP, FTPS and SFTP sources.
We found that @tpisto/ftp-any-get 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.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.