I want to establish one telnet connection but I don't want to see in the terminal what I write and read. e.g.
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
.
.
.
I don't want to see anything but still receive
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
.
.
.
Is it possible to avoid that? Thanks in advance.