in reply to creating a fake telnet middleware
Telnet isn't just a terminal. It is a protocol spoken between client and server. Intercepting such a session requires to implement the server side. See RFC 854
Greetings,
-jo
In Section
Seekers of Perl Wisdom