[Tutor] Telnet to cisco device
Python
python at venix.com
Tue Feb 28 14:04:49 CET 2006
On Tue, 2006-02-28 at 16:36 +1000, STREET Gideon (SPARQ) wrote:
> tn.read_until('Username: ') #expected prompt after telnetting to the
> router
> tn.write(user + '\r\n') #hopefully write username and pass character
> return
>
Sending both \r and \n may be confusing things.
I'd recommend using tcpwatch.py
http://hathawaymix.org/Software/TCPWatch
to monitor a telnet session that works. That way you will have a
collection of exact prompts available to build your script.
--
Lloyd Kvam
Venix Corp
More information about the Tutor
mailing list