猿问

python telnetlib问题

用python中的模块telnetlib登录远程机器怎样打印每一步的调试信息呢??

HOST = "192.168.1.192"

 user = raw_input("Enter your remote account:")

user = "mm"

 password = "pwd"

 tn = telnetlib.Telnet(HOST)

  tn.set_debuglevel(2)

 tn.open(HOST,PORT)

  tn.read_until("ktos login: ")

 tn.write(user + "\n")

 tn.read_until("Password: ")

tn.write(password + "\n")



qq_追梦_26
浏览 3014回答 1
1回答

慕慕6535539

你找到答案了吗,我也不会,能帮帮不
随时随地看视频慕课网APP

相关分类

Python
我要回答