如何从 Web 浏览器启动特定的基于 telnet 的应用程序?
我想做的是在 Intranet 网页上提供一个链接,该链接将启动 telnet 会话并将上下文信息传递给 shell 脚本,该脚本会将用户带到特定的“绿屏”。
这个“伪链接”可能有助于显示我正在寻找的内容:
<a href="telnet://<user>:<password>@<host>?showdetail%20123">detail for 123</a>
此解决方案的一部分可能是建议的 telnet 客户端,它可以与浏览器交互(可能通过 JavaScript)来完成此操作。 混淆凭据的奖励积分(但目前设想这是“只读”登录)。
谢谢!
What I'd like to do is provide a link on an intranet web page that will launch a telnet session and pass context information to a shell script that will take the user to a specific "green screen."
This "pseudolink" might help show what I'm looking for:
<a href="telnet://<user>:<password>@<host>?showdetail%20123">detail for 123</a>
Part of this solution might be a suggested telnet client that could interact with browsers (perhaps through JavaScript) to accomplish this. Bonus points for obfuscating the credentials (but this is envisioned at this point to be a "read only" login).
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在大多数浏览器(IE、FF、afaik)中,您无法使用 telnet: URL 来执行此操作。 telnet URL 最初在 RFC 1738 中描述,它仅提供主机名、端口、用户名和密码的信息。
当您单击它时,浏览器通常会向操作系统询问默认的“telnet”处理程序,这是运行的外部应用程序。 大多数现代 telnet 客户端接受这些参数并使用它们。
这种架构在浏览器之间略有不同,但应用程序通常是外部的。 bugzilla.mozilla.org 中偶尔会请求支持 telnet 插件或本机 telnet 客户端,但从未引起太多关注。
可能有像 java applet 这样的内联解决方案,但我怀疑它们是通过 telnet: URL 调用的。
You cannot do this with a telnet: URL in most browsers (IE, FF, afaik). The telnet URL was originally described in RFC 1738, and it provided only information for a hostname, port, username and password.
When you click on it, the browser will usually ask the OS for the default "telnet" handler, which is an external application that is run. Most modern telnet clients accept these parameters and put them to use.
This architecture varies a bit between browsers, but the application is usually external. There was the occasional request in bugzilla.mozilla.org for support for a telnet plugin or a native telnet client, but it never got much attention.
There might be inline solutions like a java applet, but I doubt they are called with a telnet: URL.
在我看来,并且我很乐意被证明是错误的,您将遇到沙箱(安全)问题。 看看我的问题没什么兴趣,但我认为这基本上是同一件事:你无法从浏览器打开外部应用程序,除非它们已经与 mime 类型、协议或其他内容相关联。
In my opinion, and I'd love to be proved wrong, you will have sandbox (security) problems. Check out my question here which got little interest, but I think it's basically the same thing: you cannot open external apps from the browser unless they are already associated with the mime-type, protocol, or something.
有一些 java 小程序可以用作 telnet 客户端,您可以在浏览器中使用其中之一。
There are some java applets which can be used as telnet clients, you could use one of them in the browser.