Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

scp2

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scp2 - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

28

lib/client.js

@@ -84,2 +84,11 @@ var fs = require('fs');

});
ssh.on('keyboard-interactive', function(name, instructions, instructionsLang, prompts, finish) {
self.emit('keyboard-interactive', name, instructions, instructionsLang, prompts, finish)
});
ssh.on('change password', function(message, language, done) {
self.emit('change password', message, language, done);
});
ssh.on('tcp connection', function(details, accept, reject) {
self.emit('tcp connection', details, accept, reject);
});
ssh.connect(remote);

@@ -148,2 +157,10 @@ this.__ssh = ssh;

}
var length = parseInt((content.length - 1) / 204800, 10) + 1;
var contents = [];
for (var i = 0 ; i < length; i++) {
contents.push(content.slice(i * 204800, (i + 1) * 204800));
}
var self = this;

@@ -155,6 +172,11 @@

self.emit('write', options);
sftp.write(handle, content, 0, content.length, 0, function(err) {
var writeErr = err;
var lastIndex = 0;
async.eachSeries(contents, function(content, callback) {
sftp.write(handle, content, 0, content.length, lastIndex, function(err) {
lastIndex += content.length;
callback(err);
});
}, function(err) {
sftp.close(handle, function(err) {
callback(err || writeErr);
callback(err);
});

@@ -161,0 +183,0 @@ });

14

package.json
{
"name": "scp2",
"version": "0.1.0",
"version": "0.1.1",
"description": "A pure javascript scp program based on ssh2.",

@@ -8,9 +8,13 @@ "author": "Hsiaoming Yang <lepture@me.com>",

"keywords": [
"ssh", "scp", "copy", "remote", "ssh2"
"ssh",
"scp",
"copy",
"remote",
"ssh2"
],
"dependencies": {
"ssh2": "~0.1.13",
"glob": "~3.1.21",
"ssh2": "~0.2.5",
"glob": "~3.2.1",
"async": "~0.2.6",
"lodash": "~1.0.1"
"lodash": "~1.2.1"
},

@@ -17,0 +21,0 @@ "repository": {

@@ -191,2 +191,6 @@ # scp2

**2013-06-03** `0.1.1` ~stable
1. Bugfix for scp a large file.
**2013-03-08** `0.1.0` ~ stable

@@ -193,0 +197,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc