How to send carriage return over telnet?

后端 未结 4 1898
独厮守ぢ
独厮守ぢ 2020-12-10 02:33

I am using Ubuntu telnet client. I am trying to send 2 lines over the telnet connection that I have made.

For example:

> telnet en.wikipedia.org 8         


        
相关标签:
4条回答
  • 2020-12-10 02:44

    When you are operating in a Telnet client, sending a newline or carriage return control code to the client, will send it directly to the host.

    The easiest way to do what you want would be to copy/paste the HTTP GET request from another text editor, so that the newlines are embedded in the text.

    0 讨论(0)
  • 2020-12-10 02:52

    You can set the crlf option in telnet. You can do this by, during your telnet session, typing the escape character (^]), and then "toggle crlf". A perhaps cleaner way is to specify this before making the connection:

    $ telnet
    telnet> toggle crlf
    Will send carriage returns as telnet <CR><LF>.
    telnet> open mailhost smtp
    
    0 讨论(0)
  • 2020-12-10 02:59

    Try Ctrl+Shift+Enter I tried on Mac OS Mojave Terminal.

    0 讨论(0)
  • 2020-12-10 03:01

    The real reason is this.

    For windows users, it is well known that cmd is case-insensitive by default.

    But in windows, the editing interface of telnet is case sensitive!

    Same for unix, Ubuntu, etc.

    If you enter: GET /wiki/Main_Page http/1.1, you will get the wrong result.

    If you enter: GET /wiki/Main_Page HTTP/1.1, you will get the result you want.

    This telnet problem took me hours, damn it.

    0 讨论(0)
提交回复
热议问题