Subject: Re: replacing chat
To: Zach Fine <czyz@u.washington.edu>
From: Joel Reicher <joel@panacea.null.org>
List: netbsd-help
Date: 02/26/1999 19:36:21
> Has anyone succeeded in setting up something other than a chat script
> to start a ppp connection?

Yes, although mine didn't end up using the IO that pppd sets up for its
connect process. AFAICT from when I meddled with it, pppd redirects
STDOUT and STDIN of chat to and from the "tty" device its connecting over.
If you want some user action in there you may have to use a separate
IN/OUT pair on other descriptors.

Hope I got that right. :)

Cheers,

	- Joel

> My place of work has recently set up some sort of one time password
> system. For now, I need to replace my current chat script with
> something that allows me to see the challenge string, enter it into a
> little hardware device I've been given, and then type the string the
> hardware device spits out at the prompt in order to make the
> connection happen. As far as I can tell, and I'll be happy if I've
> merely overlooked this feature, chat doesn't support user input beyond
> it's input file.  
> 
> Eventually I expect to figure out which algorithm the hardware device
> is using and remove it from the loop altogether by hacking together
> some simple script, but either way I need to use something more
> flexible than chat.
> 
> So I'm wondering how difficult it would be to replace my chat script
> with something that uses say, perl and expect? Should my script use
> STDIN and STDOUT or is there some socket I'd have to open in order to
> communicate with the remote system. I don't know where chat sends its
> output.
> 
> Someone out there must have already accomplished this or a similar
> task.
> 
> Thanks.
> 
> -Zach Fine
> czyz@u.washington.edu
> 
>