Re: Read telnet screen
- From: "Justin Piper" <jpiper@xxxxxxxxx>
- Date: Thu, 21 Sep 2006 15:36:33 GMT
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/
.
- Follow-Ups:
- Re: Read telnet screen
- From: Pawel
- Re: Read telnet screen
- References:
- Read telnet screen
- From: Pawel
- Read telnet screen
- Prev by Date: show user profile size
- Next by Date: Re: Fix a CSV file from one long line
- Previous by thread: Read telnet screen
- Next by thread: Re: Read telnet screen
- Index(es):
Relevant Pages
|
Loading