Re: Read telnet screen
- From: "Pawel" <pvl@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 25 Sep 2006 22:24:03 +0200
BIG tnx for reply ...
I'm tested it's
Uzytkownik "Justin Piper" <jpiper@xxxxxxxxx> napisal w wiadomosci
news:op.tf8ix1b1cs3d1w@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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/
.
- References:
- Read telnet screen
- From: Pawel
- Re: Read telnet screen
- From: Justin Piper
- Read telnet screen
- Prev by Date: Re: Enable the local administrator from a logon script
- Next by Date: Re: Compare lists?
- Previous by thread: Re: Read telnet screen
- Next by thread: modifying screen saver with vbscript
- Index(es):
Relevant Pages
|