Telnet 服务器

发布于 2024-07-16 22:09:22 字数 106 浏览 7 评论 0原文

系统连续多次尝试远程登录到服务器。 尝试 telnet 的进程是否有可能因缓冲区溢出而崩溃? 我的情况是一个循环中的 Perl 程序在 10 秒内尝试打开 telnet 连接并关闭 500 次。

A system is trying to telnet to a server a number of times continueously. Is there a possiblity that the process trying to telnet may crash due to buffer overflow? My situation is a perl program in a loop trying 500 times in 10 seconds opening a telnet connection and closing.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

榆西 2024-07-23 22:09:22

10 秒内 Telnet 500 次不应使您的客户端程序崩溃,但我怀疑服务器上的 telnet 和登录进程能否跟上这种连接速率。 您需要找到一种方法来保持 telnet 连接打开或切换到为轮询设计的协议,例如 SNMP。

尽管如此,您没有指出您正在使用什么 Telnet 库或程序,因此肯定存在它存在错误的可能性。

简而言之,我认为您的用例并不真正符合 Telnet 规范。

Telnetting 500 times in 10 seconds shouldn't crash your client program, but I doubt your telnet and login processes on the server can keep up with that kind of a connection rate. You need to figure out a way to leave the telnet connection open or switch to a protocol designed for polling, such as SNMP.

All that said, you didn't indicate what Telnet library or program you're using, so the possibility is certainly out there that it is buggy.

In short, I don't think your use case is really in spec for Telnet.

一绘本一梦想 2024-07-23 22:09:22

我们需要查看 Perl 程序(我假设您有它,否则您怎么知道它是 Perl)。

一种可能性是 Perl 脚本无法识别 telnet 守护程序提供的登录字符串,因此关闭连接并重试。

我不确定为什么您会认为这是缓冲区溢出(除非您有我们没有的信息)。 在我看来,如果 Perl(解释器,而不是脚本)有缓冲区溢出,它就会崩溃并且不会重试(假设没有其他东西重试脚本)。

如果您认为您的脚本存在缓冲区溢出问题,我们再次需要查看它来帮助您解决问题。

We'd need to see the Perl program (and I'm assuming you have it otherwise how would you know it's Perl).

One possibility is that the Perl script is not recognizing the login strings presented by your telnet daemon and so is shutting down the connection and retrying.

I'm not sure why you'd think it was a buffer overflow (unless you have information that we don't). It seems to me that if Perl (the interpreter, not the script) had a buffer overflow, it would just crash and there would be no retries (assuming there's not something else retrying the script).

If you think your script has a buffer overflow problem, again we'd need to see it to help you out.

清晰传感 2024-07-23 22:09:22

为什么不能让 telnet 连接保持打开状态?

我将只打开一个 telnet 连接并将其保持打开状态并使用它来发送和接收数据。 如果在指定的超时时间内没有响应,则关闭它并再次打开它。

Why can't you just leave the telnet connection open?

I would open just a single telnet connection and leave it open and use it to send and receive data. If there is no response in a specified timeout than close it and open it again.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文