| Michael Shaw 2006-11-28, 10:02 pm |
| I'm new to Tcl and to Expect. I have need of a script to log into some
200+ unix servers periodically to keep passwords from aging. Expect seemed
like the way to go. I'm working my way thru the book Exploring Expect as
well as studying scripts downloaded from the Expect home page,
expect.nist.gov. One of the scripts I downloaded was autoexpect which is
supposed to generate an expect script simply by whatching you interaction
with the target application. I've tried using it to generate an ftp script
but it always chokes when I enter the 1st character of my password when
logging in. I'm hoping to find some help.
I'm using Cygwin to emulate a Unix environment to run Expect_4.53 on a
WindowsXP platform. The Expect_4.53 was included with the Cygwin
distribution so I assume it is compatable with that environment. The
commands used follow:
autoexpect <enter>
(autoexpect responds creating script.exp)
ftp servername <enter>
(ftp responds asking for user)
username <enter>
(ftp responds asking for password)
P (no enter key depressed)
(expect responds that it is done)
The generated script.exp file contains all the expected code up to the point
of failure. Any help will be appreciated
Mike Shaw
|