Re: Read telnet screen



On Thu, 21 Sep 2006 06:13:47 -0500, Pawel <pvl@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

Welcome.

How to a check telnet login process
I'm run PuTTy session, send login:
WshShell.SendKeys TELNET_LOGIN
WshShell.SendKeys"{ENTER}"

WshShell.SendKeys TELNET_PASSWORD
WshShell.SendKeys"{ENTER}"
And need check login process - what show telnet screet (UNIX prompt or
LOGIN_SCREEn)

How to use vbs to read telnet screen information ???

A full install of PuTTY comes with a command-line program called "plink" that you could use. I have included a simple example that just reads a line from the console and writes it to plink. It assumes plink is in the path.

Option Explicit

Dim port, host
With WScript.Arguments
port = Trim(.Named("port"))
host = Trim(.Named("host"))
End With

Select Case ""
Case port, host
WScript.Quit
End Select

Dim sh, putty
Set sh = CreateObject("WScript.Shell")
Set putty = sh.Exec(Join(Array("plink -raw -P ", port, host)))

Do Until putty.Status = 1
putty.StdIn.WriteLine WScript.StdIn.ReadLine()
WScript.StdOut.WriteLine putty.StdOut.ReadLine()
Loop

--
Justin Piper
Bizco Technologies
http://www.bizco.com/
.



Relevant Pages

  • Re: Read telnet screen
    ... How to a check telnet login process ... A full install of PuTTY comes with a command-line program called "plink" ... Dim port, host ...
    (microsoft.public.scripting.vbscript)
  • Re: How can I add command through telnet?
    ... opend telnet port in a computer, ... If your putty session is opening a telnet connection, ... Using TCP to talk to a remote host is sometimes fairly simple and sometimes quite complex. ...
    (comp.soft-sys.matlab)
  • Re: openssh & solaris
    ... > expired passwords, or change next login, fails ... > with telnet, user is advised password has expired, ... > part of the login process. ... Do you Yahoo!? ...
    (SSH)
  • Re: simple graph plotting in unix
    ... > putty session to obtain a graph in color.I do know whenever i telnet ... typing 'xclock' in the remote shell, ...
    (comp.unix.shell)
  • Read telnet screen
    ... How to a check telnet login process ... And need check login process - what show telnet screet (UNIX prompt or ...
    (microsoft.public.scripting.vbscript)

Loading