Tcl Expect with Putty

别等时光非礼了梦想. 提交于 2019-12-11 04:12:31

问题


Trying to achieve a goal of running putty's plink -telnet via Tcl Expect.

When i do a regular:

plink -telnet 127.1.1.2

i get an output of the process and am able to properly conduct what i have planned.

But when i try the same from Tcl Expect:

% package require Expect
5.43.2
% exp_internal 1
% spawn plink -telnet 127.1.1.2 -s
16196
% expect -nocase login

expect: does "" (spawn_id exp4) match glob pattern "login"? no
expect: timed out

there is simply no response from the piped process.

Tcl: ActiveTcl 8.6(x86) Expect: 5.43.2 Putty: latest x86 Win10 x64

Or, if possible, could you please suggest another telnet client which works correct with tcl's expect(currently using Win7 native, but want to try something different, and yes, i know that "telnet is just a telnet", but have crash issues with the native one).

来源:https://stackoverflow.com/questions/46174136/tcl-expect-with-putty

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!