[Tutor] Telnet to cisco device

STREET Gideon (SPARQ) Gideon.STREET at ergon.com.au
Wed Mar 1 00:47:54 CET 2006


Thanks all for the replies.

I got tcpwatch up and running and where the program was hanging is
actually a page prompt, so now I just need to get the script to pass a
space whenever that prompt comes up.... I'm surprised it worked and got
to that point (that's a testament to the online tutorials).

Fun and games :)

-----Original Message-----
From: Python [mailto:python at venix.com]
Sent: Tuesday, 28 February 2006 11:05 PM
To: STREET Gideon (SPARQ)
Cc: Tutor Python
Subject: Re: [Tutor] Telnet to cisco device

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




This e-mail (including any attachments) may contain confidential or
privileged information and is intended for the sole use of the person(s) to
whom it is addressed. If you are not the intended recipient, or the person
responsible for delivering this message to the intended recipient, please
notify the sender of the message or send an e-mail to
mailto:help.desk at ergon.com.au immediately, and delete all copies. Any
unauthorised review, use, alteration, disclosure or distribution of this
e-mail by an unintended recipient is prohibited. Ergon Energy accepts no
responsibility for the content of any e-mail sent by an employee which is of
a personal nature.

Ergon Energy Corporation Limited      ABN 50 087 646 062
Ergon Energy Pty Ltd      ABN 66 078 875 902


More information about the Tutor mailing list