in reply to Re: telnet wrapper
in thread telnet wrapper

I thought of this approach already. Unfortunately, it requires the wrapper to be cognizant of telnet's output and expect "Password:". Only then can the wrapper safely apply ReadMode settings around the password request. However, since telnet is only opened for writing, the wrapper does not know what telnet outputs and the ReadMode trick can't work. The only way to make that work is if telnet is started with open3 and autoflush is turned on. Even then, I'm not sure if the login "Password:" request would get flushed because it does not contain a new line after it.

Replies are listed 'Best First'.
Re^3: telnet wrapper
by turo (Friar) on Jan 23, 2006 at 18:31 UTC

    Umm, it was only an idea, i think you have the reason ...

    A lot time ago, i've made a little script in 'Expect' a TCL extension, this expects for patterns or keyword of your program and feed that program with the data you want... maybe the Expect module for perl will help ...

    good luck

    perl -Te 'print map { chr((ord)-((10,20,2,7)[$i++])) } split //,"turo"'