Note that there are some explanatory texts on larger screens.

plurals
  1. POHow To Automate A Telnet Session Without SendKeys
    text
    copied!<p>I would like to telnet into my router, and I want to automate it so I do not have to login all the time, as I do it several times a day.</p> <p>Is there another method apart from sendkeys in VBS? This is because that physically types, so the telnet window needs to be active, with is rather annoying.</p> <p>I tried a batch file, but I am getting really strange results. Here it is:</p> <pre><code>telnet 192.168.1.254 REM This is the router IP ping 255.255.255.255 -n 1 -w 1000 &gt; nul REM This is to wait for the router if its being slow George REM This is the username, as it prompts as soon as it logs in ping 255.255.255.255 -n 1 -w 1000 &gt; nul (the password) ping 255.255.255.255 -n 1 -w 1000 &gt; nul system REM Enters the system menu ping 255.255.255.255 -n 1 -w 10 &gt; nul debug REM Enters the Debug menu ping 255.255.255.255 -n 1 -w 100 &gt; nul :s cpu REM This lets me see the CPU usage ping 255.255.255.255 -n 1 -w 1000 &gt; nul REM Wait while it lists it mem REM Checks the memory ping 255.255.255.255 -n 1 -w 1000 &gt; nul REM Waits again! goto s REM I need a loop otherwise I would have to type out lots of code! </code></pre> <p>Here are the results:</p> <pre><code>C:\Users\George\Desktop&gt;telnet 192.168.1.254 C:\Users\George\Desktop&gt;telnet 192.168.1.254 ^C Terminate batch job (Y/N)? </code></pre> <p>Why is it doing this? This would be my expected result...</p> <pre><code>Username : George Password : ******* ------------------------------------------------------------------------ ______ Technicolor TG582n ___/_____/\ / /\\ 8.C.M.0.AR _____/__ / \\ _/ /\_____/___ \ Copyright (c) 1999-2012, Technicolor // / \ /\ \ _______//_______/ \ / _\/______ / / \ \ / / / /\ __/ / \ \ / / / / _\__ / / / \_______\/ / / / / /\ /_/______/___________________/ /________/ /___/ \ \ \ \ ___________ \ \ \ \ \ / \_\ \ / /\ \ \ \ \___\/ \ \/ / \ \ \ \ / \_____/ / \ \ \________\/ /__________/ \ \ / \ _____ \ /_____\/ \ / /\ \ /___\/ /____/ \ \ / \ \ /___\/ \____\/ ------------------------------------------------------------------------ {George}=&gt;system {George}=&gt;debug {George}[system debug]=&gt;cpu CPU (%): Idle User Kernel 57.43 0.99 41.58 {George}[system debug]=&gt;mem Total: 61280 KB Used: 45216 KB by kernel: 30748 KB by applications: 14468 KB {George}[system debug]=&gt; </code></pre> <p>So, Why is it doing this? </p> <p>Can I use another method apart from sendkeys?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload