Errors transmitting binary data over a telnet connection
The networking swiss army knife
Status: Beta
Brought to you by:
themnemonic
netcat doesn't handle RFC 854 correctly when sending
binary data to a telnet server (in this case an
Emulex terminal server). For example, if the data
stream contains ... $FF $FC $XX .., these three
bytes will be omitted on the receiving end as these
are interpreted as a telnet command sequence.
This is how netcat is called:
netcat -t host port <binary.bin
According to page 14 of the RFC:
"With the current set-up, only the IAC need be
doubled to be sent as data, and the other 255 codes
may be passed transparently."
So netcat needs to escape all occurances of $FF
in the data stream if using a telnet connection.