telnet-client
Advanced tools
Comparing version 0.5.0 to 0.6.0
@@ -156,3 +156,8 @@ // Node.js Telnet client | ||
if (promptIndex !== -1) { | ||
if (typeof telnetObj.failedLoginPrompt !== 'undefined' && search(stringData, telnetObj.failedLoginPrompt) !== -1) { | ||
telnetObj.telnetState = 'failedlogin' | ||
telnetObj.emit('failedlogin', stringData) | ||
telnetObj.destroy() | ||
} | ||
else if (promptIndex !== -1) { | ||
telnetObj.shellPrompt = stringData.substring(promptIndex) | ||
@@ -173,7 +178,2 @@ telnetObj.telnetState = 'sendcmd' | ||
} | ||
else if (typeof telnetObj.failedLoginPrompt !== 'undefined' && search(stringData, telnetObj.failedLoginPrompt) !== -1) { | ||
telnetObj.telnetState = 'failedlogin' | ||
telnetObj.emit('failedlogin', stringData) | ||
telnetObj.destroy() | ||
} | ||
else return | ||
@@ -180,0 +180,0 @@ } |
@@ -8,3 +8,3 @@ { | ||
}, | ||
"version": "0.5.0", | ||
"version": "0.6.0", | ||
"main": "./lib/telnet-client.js", | ||
@@ -11,0 +11,0 @@ "engine": "node >= 0.10.29", |
Sorry, the diff of this file is not supported yet
19350