我想建立一个telnet连接,但是我不想在终端中看到我写和读的内容。例如tn = telnetlib.Telnet(host)tn.write(command.encode('ascii') + b"\n")time.sleep(0.1)ret = True if b'iconstorage' in self.tn.read_until(b'iconstorage') else False...我什么也不想看到,但仍然收到 Telnet(host): send b'command\n' Telnet(host): recv b'\xff\xfd\x01\xff\xfd\x1f\xff\xfb\x01\xff\xfb\x03\r\r\nls\r\n~ # ls\r\n\x1b[1;34mbin\x1b[0m ' Telnet(host): IAC DO 1 Telnet(host): IAC DO 31 Telnet(host): IAC WILL 1 Telnet(host): IAC WILL 3...有可能避免这种情况吗?提前致谢。
添加回答
举报
0/150
提交
取消