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

telnet-client

Package Overview
Dependencies
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

telnet-client - npm Package Compare versions

Comparing version 0.10.4 to 0.10.6

2

app.js

@@ -11,3 +11,3 @@ var telnet = require('./lib')

}).then(function() {
connection.exec('hi')
connection.send('hi')
.then(function(res) {

@@ -14,0 +14,0 @@ console.log(res)

@@ -167,3 +167,3 @@ // Node.js Telnet client

if (opts && opts.waitfor === undefined) {
if ((opts && opts.waitfor === undefined) || !opts) {
setTimeout(function() {

@@ -170,0 +170,0 @@ if (response === '') return reject(new Error('response not received'))

@@ -8,3 +8,3 @@ {

},
"version": "0.10.4",
"version": "0.10.6",
"main": "./lib/index.js",

@@ -11,0 +11,0 @@ "engine": "node >= 0.10.29",

@@ -49,3 +49,41 @@ var telnet = process.env.NODETELNETCLIENT_COV

connection.connect(params);
},
send_data_without_options: function(test) {
var connection = new telnet()
var params = {
host: '127.0.0.1',
port: 2323,
negotiationMandatory: false
}
connection.on('connect', function() {
connection.send('Hello, server.', function(error, data) {
test.strictEqual(data.toString(), 'Hello, user.\r\n')
test.done()
connection.end()
})
})
connection.connect(params)
},
send_data_without_options_promise: function(test) {
var connection = new telnet()
var params = {
host: '127.0.0.1',
port: 2323,
negotiationMandatory: false
}
connection.connect(params).then(function() {
connection.send('Hello, server.').then(function(data) {
test.strictEqual(data.toString(), 'Hello, user.\r\n')
test.done()
connection.end()
})
})
}
})
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