Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
622 views
in Technique[技术] by (71.8m points)

Windows 10 automated telnet script to send command every x seconds

I have been trying to connect to a piece of hardware via telnet to get its temperatures with an automated script, my problem is that anything but Putty seems to send each char rather than the entire word, the best tool I have found so far is MPutty (multi tab Putty) but even though it has a script feature there does not seem to be any direct support for while loops or any continuous sending of commands.

I have tried the built in Windows telnet with a batch script but even if i change the mode from stream to batch it still sends each char instead of sending the command. I have also tried Plink.exe but again I get the same issue where it send each char.

I am sure it is the hardware to blame and it is obviously very fussy about the syntax of the commands and it must be a full command sent not each char of the command. I have no idea why Putty and MPutty works but the rest do not.

All I want to do is send get temp every 5 or 10 seconds via telnet, no username or password is required.

Can anyone recommend a tool or has a piece of code that I could simply adjust for my needs, I have wasted the entire day with nothing but failures on what should be a easy task... lol how I was wrong...


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...