通过Telnet运行应用程序 [英] Running applications through Telnet

查看:278
本文介绍了通过Telnet运行应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要创建一个BAT文件来通过telnet运行应用程序,但是据我所知,没有办法在DOS上执行此操作。 Telnet不允许在连接瞬间将任何命令发送到远程计算机,并且BAT文件中的每个后续命令仅在telnet停止后才执行。这段假设的代码说明了我想做的事情:

I need to create a BAT file to run an application through telnet, but as far as I know there is no way to do this on DOS. Telnet does not allow any command to be sent to the remote machine at the very instant of the connection, and each subsequent command in the BAT file would only be executed after telnet stops. This hypothetical piece of code illustrates what I want to do:

telnet 100.99.98.1 "C:\Application\app.exe -a -b -c"

这将在计算机100.99上运行app.exe。 98.1具有三个参数。尽管我做出了努力,但没有任何效果。有没有办法做到?

And that would run the app.exe on the machine 100.99.98.1 with three parameters. Despite my efforts, nothing worked. Is there a way to do that?

Tks,

Pedrin Batista

Pedrin Batista

推荐答案

给出期望尝试一下

来自网页:


Expect是自动执行$ b $的工具b交互式应用程序,例如
telnet ,ftp,passwd,fsck,rlogin,
小费等。期望确实使这
的东西微不足道。 Expect对于测试这些相同的应用程序也是有用的

Expect is a tool for automating interactive applications such as telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect really makes this stuff trivial. Expect is also useful for testing these same applications.

这篇关于通过Telnet运行应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆