HT telnet interact with auto login?
Klaus Reinhardt
K.Rdt at TU-Berlin.DE
Sun Jun 16 16:11:53 EDT 2002
Am 16.06.02 23:06:29, schrieb Paul Boehm <paul at soniq.net>:
>is this what you want?
No. Thanks anyway - Klaus
>
># On Sun, Jun 16, 2002 at 06:07:30PM +0000, Klaus Reinhardt wrote:
>import getpass
>import sys
>import telnetlib
>
>HOST = "...de"
>tn = telnetlib.Telnet(HOST)
>
>user = '...'
>password = '...'
>
># 2.)
>tn.read_until("login: ") # this seams to work
> # but without connection
>tn.write(user + "\n")
>if password:
> tn.read_until("Password: ")
> tn.write(password + "\n")
># 1.)
>tn.interact() # this is working but with manually ..
>
>
----------------- mailto:K.Rdt at TU-Berlin.DE start -------------------
Hi
K at Rdt
----------------- mailto:K.Rdt at TU-Berlin.DE !end! -------------------
More information about the Python-list
mailing list