I'm using telnetlib to connect to a remote telnet server and parse it's response, however, all telnetlib's read_*
methods return its raw response - including raw telnet command bytes (starting with 0xFF) - which is undesirable for my purpose.
For example, when calling read_all
:
desired output - b'Hello'
output returned by telnetlib - b'\xff\xfd\x18\xff\xfdHello'
Is there a way to make telnetlib exclude those special telnet control bytes from its output?