[SGVLUG] Automating (scripting) telnet

Michael Proctor-Smith mproctor13 at gmail.com
Tue Feb 21 12:41:12 PST 2006


On 2/21/06, Dustin Laurence <dustin at dogbert.laurences.net> wrote:
> On Tue, Feb 21, 2006 at 12:28:15PM -0800, Emerson, Tom wrote:
>
> > If I just "feed" this to telnet, i.e., "telnet <cmds", it doesn't work -- telnet doesn't seem to "wait" for the server to actually be "ready for input" before sending the commands -- it might see "user <me>", for instance, but only get "last-half-of-password>" as the next "command" since my client would have started sending it before the server responded with "OK, hello <you><crlf>".
> >
> > any thoughts?
>
> What about "Expect?"  I haven't really used it but I gather that's
> exactly what it does--wait for text and respond to it appropriately.
>
> Dustin
>

Dustin beat me to it but, expect is your what you want it rocks for
this kind of thing.


More information about the SGVLUG mailing list