【发布时间】:2017-02-14 22:30:10
【问题描述】:
得到了一个简单的脚本,可以对服务器执行命令 - 简单地说:
//Create shell
set WshShell=CreateObject("WScript.Shell")
WshShell.run "cmd.exe"
//send commands
WshShell.SendKeys "telnet IP_ADDRESS"
WshShell.Sendkeys "dir"
服务器提供了我想要获取的反馈。我只需要将第一行捕获到一个变量中,然后打印该变量即可确认。
你能帮忙吗?谢谢。
【问题讨论】:
标签: windows command-line vbscript