Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
A tool for ftp.
To view documentation or get support, visit docs.
Note:
w-ftp
is mainly dependent on the fork ofjsftp
,lodash
andwsemi
.
npm i w-ftp
Link: [dev source code]
import path from 'path'
import fs from 'fs'
import WFtp from './src/WFtp.mjs'
// import WFtp from './dist/w-ftp.umd.js'
//st
let fp = path.resolve('../', './_data', 'settings.json')
let j = fs.readFileSync(fp, 'utf8')
let st = JSON.parse(j)
console.log(st)
async function test_dw() {
let r
let ftp = WFtp()
// console.log('ftp', ftp)
await ftp.conn({
hostname: st.dw.hostname,
port: st.dw.port,
username: st.dw.username,
password: st.dw.password,
})
async function core() {
let fps = await ftp.ls('.')
console.log('ftp.ls', fps[0], fps.length)
r = await ftp.download('./DECL_20210805055044.csv', './_test_download_client/DECL_20210805055044.csv', (p) => {
console.log('ftp.download p', p.name, p.progress)
})
console.log('ftp.download', r)
r = await ftp.syncToLocal('.', './_test_download_client', (p) => {
console.log('ftp.syncToLocal p', p.name, p.progress)
})
console.log('ftp.syncToLocal', r)
}
await core()
.catch((err) => {
console.log(err)
})
r = await ftp.quit()
console.log('ftp.quit', r)
}
test_dw()
.catch((err) => {
console.log(err)
})
// ftp.ls {
// name: 'DECL_202108.csv',
// type: 0,
// time: 1658302140000,
// size: '218690',
// owner: 'ftp',
// group: 'ftp',
// userPermissions: { read: true, write: true, exec: false },
// groupPermissions: { read: true, write: true, exec: false },
// otherPermissions: { read: true, write: true, exec: false }
// } 74
// ftp.isFile false
// ftp.isFolder false
// ftp.download p DECL_20210805055044.csv 4.7320871554333515
// ftp.download p DECL_20210805055044.csv 9.464174310866703
// ftp.download p DECL_20210805055044.csv 14.196261466300053
// ftp.download p DECL_20210805055044.csv 18.928348621733406
// ftp.download p DECL_20210805055044.csv 23.660435777166754
// ftp.download p DECL_20210805055044.csv 28.392522932600105
// ftp.download p DECL_20210805055044.csv 33.12461008803346
// ftp.download p DECL_20210805055044.csv 37.85669724346681
// ftp.download p DECL_20210805055044.csv 42.58878439890016
// ftp.download p DECL_20210805055044.csv 47.32087155433351
// ftp.download p DECL_20210805055044.csv 52.05295870976686
// ftp.download p DECL_20210805055044.csv 56.78504586520021
// ftp.download p DECL_20210805055044.csv 61.517133020633565
// ftp.download p DECL_20210805055044.csv 66.24922017606691
// ftp.download p DECL_20210805055044.csv 70.98130733150026
// ftp.download p DECL_20210805055044.csv 75.71339448693362
// ftp.download p DECL_20210805055044.csv 80.44548164236697
// ftp.download p DECL_20210805055044.csv 85.17756879780032
// ftp.download p DECL_20210805055044.csv 89.90965595323367
// ftp.download p DECL_20210805055044.csv 94.64174310866701
// ftp.download p DECL_20210805055044.csv 99.37383026410038
// ftp.download p DECL_20210805055044.csv 100
// ftp.download ok
// ftp.syncToLocal { num: 0, files: [] }
// ftp.quit { code: 221, text: '221 Goodbye.', isMark: false, isError: false }
Link: [dev source code]
import path from 'path'
import fs from 'fs'
import WFtp from './src/WFtp.mjs'
// import WFtp from './dist/w-ftp.umd.js'
//st
let fp = path.resolve('../', './_data', 'settings.json')
let j = fs.readFileSync(fp, 'utf8')
let st = JSON.parse(j)
console.log(st)
async function test_up() {
let r
let ftp = WFtp()
// console.log('ftp', ftp)
await ftp.conn({
hostname: st.up.hostname,
port: st.up.port,
username: st.up.username,
password: st.up.password,
})
async function core() {
let fps = await ftp.ls('.')
console.log('ftp.ls', fps[0], fps.length)
r = await ftp.upload('./_test_upload_client/DECL_20210805055044.csv', './DECL_20210805055044.csv', (p) => {
console.log('ftp.upload p', p.name, p.progress)
})
console.log('ftp.upload', r)
r = await ftp.syncToRemote('./_test_upload_client', '.', (p) => {
console.log('ftp.syncToRemote p', p.name, p.progress)
})
console.log('ftp.syncToRemote', r)
}
await core()
.catch((err) => {
console.log(err)
})
r = await ftp.quit()
console.log('ftp.quit', r)
}
test_up()
.catch((err) => {
console.log(err)
})
// ftp.ls {
// name: 'DECL_202108.csv',
// type: 0,
// time: 1658366760000,
// size: '218690',
// owner: 'ftp',
// group: 'ftp',
// userPermissions: { read: true, write: true, exec: false },
// groupPermissions: { read: true, write: true, exec: false },
// otherPermissions: { read: true, write: true, exec: false }
// } 73
// ftp.isFile false
// ftp.isFolder false
// ftp.upload p DECL_20210805055044.csv 75.71339448693362
// ftp.upload p DECL_20210805055044.csv 100
// ftp.upload ok
// ftp.syncToRemote { num: 0, files: [] }
// ftp.quit { code: 221, text: '221 Goodbye.', isMark: false, isError: false }
FAQs
A tool for FTP(FTP, SFTP).
The npm package w-ftp receives a total of 11 weekly downloads. As such, w-ftp popularity was classified as not popular.
We found that w-ftp 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.