telnet-client
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -60,2 +60,3 @@ /// <reference types="node" /> | ||
username?: string; | ||
disableLogon?: boolean; | ||
} | ||
@@ -62,0 +63,0 @@ export declare class Telnet extends EventEmitter { |
@@ -41,3 +41,4 @@ "use strict"; | ||
username: 'root', | ||
waitFor: false | ||
waitFor: false, | ||
disableLogon: false | ||
}; | ||
@@ -421,3 +422,3 @@ Object.freeze(defaultOptions); | ||
login(handle) { | ||
if ((handle === 'username' || handle === 'password') && this.socket.writable) { | ||
if ((handle === 'username' || handle === 'password') && this.socket.writable && !this.opts.disableLogon) { | ||
this.socket.write(this.opts[handle] + this.opts.ors, () => { | ||
@@ -424,0 +425,0 @@ this.state = 'getprompt'; |
@@ -8,3 +8,3 @@ { | ||
}, | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"main": "./lib/index.js", | ||
@@ -11,0 +11,0 @@ "types": "./lib/index.d.ts", |
@@ -244,2 +244,4 @@ [![GitHub license](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://github.com/mkozjak/node-telnet-client/blob/master/LICENSE) | ||
* `disableLogon`: If set to `true`, the library will not try to login into to the host automatically. This is set to `false` by default. | ||
Resolves once the connection is ready (analogous to the ```ready``` event). | ||
@@ -246,0 +248,0 @@ Rejects if the timeout is hit. |
Sorry, the diff of this file is not supported yet
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
63862
631
364