节点JS telnet服务器奇怪的输入和奇怪的输出(Node JS telnet server weird input and strange output)

编程入门 行业动态 更新时间:2024-10-10 17:32:39
节点JS telnet服务器奇怪的输入和奇怪的输出(Node JS telnet server weird input and strange output)

嘿家伙我正在运行这台服务器它在我的Mac上运行得很好。 但是,当我连接到我的Mac上运行的服务器时,通过我的Windows计算机上的telnet,所有文本都是倾斜的,输入是单个字符。 非常感谢帮助。

先谢谢你。

Hey guys I'm running this server It runs great on my mac. But when I connect to the server, which is running on my mac, via telnet on my windows computer all the text is skew and input is in single characters. Help would be greatly appreciated.

Thank you in advance.

最满意答案

默认情况下,您的telnet客户端看起来不以线路模式运行。 当您尝试键入密码时,它会读取第一个字符,服务器会将其与预期密码进行比较:

$ telnet localhost 8000 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Password:RPassword rejected:RConnection closed by foreign host.

尝试使用netcat http://en.wikipedia.org/wiki/Netcat 。 它是行缓冲的:

$ nc localhost 8000 Password:Rushabh [me]: has joined the chattest [me]:test second test [me]:second test

如果你真的想使用telnet,你可以改变你的服务器来处理逐字符输入,或者尝试转义(^])并设置mode line (出于某种原因,我没有成功。我正在使用由Cygwin项目分发的telnet客户端。)

Looks like your telnet client does not operate in line mode by default. When you try to type the password it reads the first character and your server compares it with the expected password:

$ telnet localhost 8000 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Password:RPassword rejected:RConnection closed by foreign host.

Try using netcat http://en.wikipedia.org/wiki/Netcat. It is line buffered:

$ nc localhost 8000 Password:Rushabh [me]: has joined the chattest [me]:test second test [me]:second test

If you really want to use telnet, you can either change your server to deal with character by character input, or try escaping (^]) and set mode line (For some reason, I was not successful with this. I'm using the telnet client distributed by the Cygwin project.)

更多推荐

本文发布于:2023-08-05 16:43:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1437197.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:奇怪   节点   服务器   telnet   JS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!