Telnet from XOJO

How would I go about using plink to create a telnet session? Here is the code that I am currently using. It keeps timing out, and I don’t understand why.

Dim plink As String = “C:\plink -telnet 192.168.0.99 23”
Dim s As New Shell
s.Execute(plink)
msgBox(s.Result)

You may want to have a look here : https://forum.xojo.com/6669-my-telnet-class-for-xojo/0

I have tried to use the TELNET class provided in the link above, but for one reason or another even the demo project doesn’t work for me. Is there any possible way to do it utilizing plink and shell commands?

No idea. But the very same topic came up https://forum.xojo.com/31841-shell-telnet recently. You may want to participate there.

Here is the direct link to my repo:

https://github.com/IntelligentVisibility/TELNET_Class_Xojo

Whats your issue?

I just used the demo project successfully from the repo using Xojo 2015 r4.1.

[quote=262670:@Jonathan Chaidez]How would I go about using plink to create a telnet session? Here is the code that I am currently using. It keeps timing out, and I don’t understand why.

Dim plink As String = “C:\plink -telnet 192.168.0.99 23”
Dim s As New Shell
s.Execute(plink)
msgBox(s.Result)[/quote]

Have you tried to change the timeout: s.TimeOut = 60000 // 60 seconds or s.TimeOut = -1 // No time-out. By default in windows the time-out is 2 seconds.

Dim plink As String = "C:\\plink -telnet 192.168.0.99 23"
  Dim s As New Shell
  s.TimeOut = -1
  s.Execute(plink)
  msgBox(s.Result)[/quote]

More info: http://documentation.xojo.com/index.php/Shell.TimeOut