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.7 to 0.11.0

49

app.js

@@ -1,39 +0,20 @@

var t = require('./lib/index')
var c = new t()
var telnet = require('./lib')
var params = {
var connection = new telnet()
connection.connect({
host: '127.0.0.1',
port: 8080,
port: 1337,
execTimeout: 1000,
negotiationMandatory: false
}
c.on('failedlogin', function() {
console.log('login failed')
})
/*
c.on("connect", function() {
console.log('sending data')
c.send('something', {
ors: '\r\n',
waitfor: '\n'
}, function(error, data) {
console.log('received a response', data)
})
})
*/
c.connect(params).then(function() {
setInterval(function() {
console.log('sending')
c.send('something', {
ors: '\r\n',
waitfor: '\n'
}, function(error, data) {
console.log('received a response:', error, data)
}).then(function() {
connection.send('hi')
.then(function(res) {
console.log(res)
}, function(error) {
console.log(error)
})
}, 2000)
.catch(function(error) {
console.log(error)
})
})

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

if (search(stringData, telnetObj.pageSeparator) !== -1) {
telnetObj.telnetSocket.write(Buffer('20', 'hex'))
telnetObj.telnetSocket.write(Buffer.from('20', 'hex'))
}

@@ -310,3 +310,3 @@

if (socket.writable) socket.write(Buffer(negResp, 'hex'))
if (socket.writable) socket.write(Buffer.from(negResp, 'hex'))

@@ -313,0 +313,0 @@ if (cmdData != undefined) return cmdData

@@ -8,5 +8,5 @@ {

},
"version": "0.10.7",
"version": "0.11.0",
"main": "./lib/index.js",
"engine": "node >= 0.10.29",
"engine": "node >= 6.9.1",
"license": "MIT",

@@ -13,0 +13,0 @@ "dependencies": {

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