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.15.1 to 0.15.2

app.js

2

package.json

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

},
"version": "0.15.1",
"version": "0.15.2",
"main": "./lib/index.js",

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

@@ -32,7 +32,33 @@ [![GitHub license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/mkozjak/node-telnet-client/blob/master/LICENSE)

## Usage example
### Async/Await (Node.js >= 7.6.0)
```js
'use strict'
const Telnet = require('telnet-client')
async function run() {
let connection = new Telnet()
let params = {
host: '127.0.0.1',
port: 23,
shellPrompt: '/ # ',
timeout: 1500
}
await connection.connect(params)
let res = await connection.exec('uptime')
console.log('async result:', res)
}
run()
```
### Callback-style
```js
var telnet = require('telnet-client')
var connection = new telnet()
var Telnet = require('telnet-client')
var connection = new Telnet()

@@ -68,4 +94,4 @@ var params = {

```js
var telnet = require('telnet-client')
var connection = new telnet()
var Telnet = require('telnet-client')
var connection = new Telnet()

@@ -96,4 +122,4 @@ var params = {

var bluebird = require('bluebird')
var telnet = require('telnet-client')
var connection = new telnet()
var Telnet = require('telnet-client')
var connection = new Telnet()

@@ -142,3 +168,3 @@ var params = {

async function run() {
let connection = new telnet()
let connection = new Telnet()

@@ -164,4 +190,4 @@ let params = {

```js
var telnet = require('telnet-client')
var connection = new telnet()
var Telnet = require('telnet-client')
var connection = new Telnet()
```

@@ -168,0 +194,0 @@

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