4 ms·
This is correct, telnet will send IAC codes (0x255) followed by two bytes. WILL, WONT, DO, DONT. If telnet encounters a IAC code, it will read the next two byte
by gabereiser 3y ago
This is correct, telnet will send IAC codes (0x255) followed by two bytes. WILL, WONT, DO, DONT. If telnet encounters a IAC code, it will read the next two bytes or subcommand bytes hiding that from your output. Telnet should not be used for TCP debugging.
- giraffe_lady 3y ago0xff right? decimal 255? Anyway though I have actually had to write a from scratch parser/interface to a custom and mostly undocumented old telnet system including multiple subprotocol negotiations and it really is pretty shitty. Even using it for more or less its intended purpose sucks.
- reactordev 3y agoYes 0xFF, my brain short circuited. It’s a hairy protocol unless you scan byte by byte into a buffer, branching when you receive IAC codes. Because they can come mid-stream. Anytime. Anywhere in the buffer of packet data.