telnet-client
Advanced tools
Comparing version 1.2.11 to 1.4.0
@@ -46,2 +46,3 @@ 'use strict' | ||
this.initialLFCR = (typeof opts.initialLFCR !== 'undefined' ? opts.initialLFCR : false) | ||
this.initialCTRLC = (typeof opts.initialCTRLC !== 'undefined' ? opts.initialCTRLC : false) | ||
this.execTimeout = (typeof opts.execTimeout !== 'undefined' ? opts.execTimeout : 2000) | ||
@@ -72,2 +73,3 @@ this.sendTimeout = (typeof opts.sendTimeout !== 'undefined' ? opts.sendTimeout : 2000) | ||
if (this.initialCTRLC === true) this.socket.write(Buffer.from('03', 'hex')) | ||
if (this.initialLFCR === true) this.socket.write('\r\n') | ||
@@ -374,4 +376,5 @@ if (this.negotiationMandatory === false) resolve() | ||
if (this.promptSameLine) { | ||
this.response[this.response.length - 1] = | ||
this.response[this.response.length - 1].replace(this.shellPrompt, '') | ||
if(this.response[this.response.length - 1]) | ||
this.response[this.response.length - 1] = | ||
this.response[this.response.length - 1].replace(this.shellPrompt, '') | ||
} | ||
@@ -378,0 +381,0 @@ else { |
@@ -8,3 +8,3 @@ { | ||
}, | ||
"version": "1.2.11", | ||
"version": "1.4.0", | ||
"main": "./lib/index.js", | ||
@@ -11,0 +11,0 @@ "types": "./lib/index.d.ts", |
@@ -218,2 +218,3 @@ [![GitHub license](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://github.com/mkozjak/node-telnet-client/blob/master/LICENSE) | ||
* `failedLoginMatch`: String or regex to match if your host provides login failure messages. Defaults to undefined. | ||
* `initialCTRLC`: Flag used to determine if an initial 0x03 (CTRL+C) should be sent when connected to server. | ||
* `initialLFCR`: Flag used to determine if an initial '\r\n' (CR+LF) should be sent when connected to server. | ||
@@ -220,0 +221,0 @@ * `username`: Username used to login. Defaults to 'root'. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50008
1088
339