telnet-client
Advanced tools
Comparing version 0.6.1 to 0.7.0
@@ -30,3 +30,3 @@ // Node.js Telnet client | ||
self.passwordPrompt = (typeof opts.passwordPrompt !== 'undefined' ? opts.passwordPrompt : /Password: /i) | ||
self.failedLoginPrompt = opts.failedLoginPrompt | ||
self.failedLoginMatch = opts.failedLoginMatch | ||
@@ -94,3 +94,3 @@ self.debug = (typeof opts.debug !== 'undefined' ? opts.debug : false) | ||
self.loginPrompt = opts.loginPrompt || self.loginPrompt | ||
self.failedLoginPrompt = opts.failedLoginPrompt || self.failedLoginPrompt | ||
self.failedLoginMatch = opts.failedLoginMatch || self.failedLoginMatch | ||
self.timeout = opts.timeout || self.timeout | ||
@@ -159,3 +159,3 @@ self.irs = opts.irs || self.irs | ||
if (typeof telnetObj.failedLoginPrompt !== 'undefined' && search(stringData, telnetObj.failedLoginPrompt) !== -1) { | ||
if (typeof telnetObj.failedLoginMatch !== 'undefined' && search(stringData, telnetObj.failedLoginMatch) !== -1) { | ||
telnetObj.telnetState = 'failedlogin' | ||
@@ -162,0 +162,0 @@ telnetObj.emit('failedlogin', stringData) |
@@ -8,3 +8,3 @@ { | ||
}, | ||
"version": "0.6.1", | ||
"version": "0.7.0", | ||
"main": "./lib/telnet-client.js", | ||
@@ -11,0 +11,0 @@ "engine": "node >= 0.10.29", |
@@ -129,3 +129,3 @@ [](https://github.com/mkozjak/node-telnet-client/blob/master/LICENSE) | ||
* `passwordPrompt`: Username/login prompt that the host is using. Can be a string or an instance of RegExp. Defaults to regex '/Password: /i'. | ||
* `loginFailedPrompt`: String or regex to match if your host provides login failure messages. Defaults to undefined. | ||
* `failedLoginMatch`: String or regex to match if your host provides login failure messages. Defaults to undefined. | ||
* `username`: Username used to login. Defaults to 'root'. | ||
@@ -154,3 +154,3 @@ * `password`: Username used to login. Defaults to 'guest'. | ||
* `loginPrompt`: Username/login prompt that the host is using. Can be a string or an instance of RegExp. Defaults to regex '/login[: ]*$/i'. | ||
* `loginFailedPrompt`: String or regex to match if your host provides login failure messages. Defaults to undefined. | ||
* `failedLoginMatch`: String or regex to match if your host provides login failure messages. Defaults to undefined. | ||
* `timeout`: Sets the socket to timeout after the specified number of milliseconds | ||
@@ -190,3 +190,3 @@ of inactivity on the socket. | ||
Emitted when the loginFailedPrompt pattern is provided and a match is found from the host. The 'destroy()' method is called directly following this event. | ||
Emitted when the failedLoginMatch pattern is provided and a match is found from the host. The 'destroy()' method is called directly following this event. | ||
@@ -193,0 +193,0 @@ ### Event: 'error' |
19576