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: Bruce Hartweg <bruce-news@hartweg.us>
Date: Tue Dec 13 2005 - 00:44:18 CET

Uwe Klein wrote:

> 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.
>

the error was adding an "eval" to the spawn command

> uwe
>
>
Received on Fri Dec 23 18:59:20 2005