Re: [expect] passing compound arguments to spawn
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: [expect] passing compound arguments to spawn

From: Uwe Klein <uwe_klein_habertwedt@t-online.de>
Date: Mon Dec 12 2005 - 23:37:08 CET

Andrew Falanga wrote:
> Uwe Klein wrote:
>
>>Andrew Falanga wrote:
>
> <res = "Password: ">
>
> Please explain what is meant by this code.

assumed you type the commands at the expect prompt:

if you do a plain [expect] after enough time had passed
i.e. ssh has started and is requesting a password:
the result would be "Password: "
(expect with no arguments returns all characters received
upto this moment.)

you would type "exp_send <a password>\r" and if the password
you typed is correct with the next call to expect
you should get confirmation of login and all the stuff
the commands you gave with the initial spawn should return.

to make a long text into a short statemaent:

what you tried should have worked perfectly.
There is some other error you made.

uwe
Received on Fri Dec 23 18:59:16 2005