You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to set up the package for a simple connection without login. I've try some example but it seem that the connection doesn't work. The code have to work on Windows and the connection is working using the telnet client feature.
Here is the code
import{Telnet}from"telnet-client";constconnection=newTelnet();// these parameters are just examples and most probably won't work for your use-case.constparams={host: "192.168.10.112",port: 4567,negotiationMandatory: false,};connection.on("ready",(prompt)=>{console.log("prompt",prompt);connection.exec(cmd,(err,response)=>{console.log("rep",response);});});connection.on("timeout",()=>{console.log("socket timeout!");connection.end();});connection.on("close",()=>{console.log("connection closed");});connection.connect(params);
And here is the result
socket timeout!
connection closed
Thanks
The text was updated successfully, but these errors were encountered:
Hello,
I try to set up the package for a simple connection without login. I've try some example but it seem that the connection doesn't work. The code have to work on Windows and the connection is working using the telnet client feature.
Here is the code
And here is the result
Thanks
The text was updated successfully, but these errors were encountered: