in reply to 'telnet' sending bizarre ascii to perl server

The full 'telnet' protocol is more than just "connect and pump bytes", like many seem to assume. My guess is that your telnet client uses the full telnet protocol when not given a port number and avoids the optional negotiations (which your server doesn't understand) when given a specific port number (even if that port number is 23).

        - tye (but my friends call me "Tye")
  • Comment on (tye)Re: 'telnet' sending bizarre ascii to perl server

Replies are listed 'Best First'.
Re: (tye)Re: 'telnet' sending bizarre ascii to perl server
by JPaul (Hermit) on Mar 09, 2001 at 02:20 UTC
    So what would be the way to make perl 'aware' of when telnet is coming-on-strong with the full protocol, rather than not?

    JP -- Alexander Widdlemouse undid his bellybutton and his bum dropped off --

      Well, modify your TCP server to use the telnet protocol if you wish to connect to it via telnet. Would you use a QuakeWorld client to connect to an FTP server?
      AgentM Systems nor Nasca Enterprises nor Bone::Easy nor Macperl is responsible for the comments made by AgentM. Remember, you can build any logical system with NOR.
      Maybe kick telnet, and use a raw-tcp client, like netcat. It's great tool for this kind of experiences.
      A quick search on google will help you to find it.
      ____________________
      Hope this helps

      It doesn't look (from a quick look) like Net::Telnet knows the Telnet protocol nor that some other module in CPAN does. O-: Perhaps someone would enjoy teaching it to Net::Telnet?

              - tye (but my friends call me "Tye")