HT telnet interact with auto login?
Klaus Reinhardt
K.Rdt at TU-Berlin.DE
Sun Jun 16 14:07:30 EDT 2002
Hi!
I want to combine:
import getpass
import sys
import telnetlib
HOST = "...de"
tn = telnetlib.Telnet(HOST)
user = '...'
password = '...'
1.)
tn.interact() # this is working but with manually ..
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")
TiA for each tip
Klaus
More information about the Python-list
mailing list